Modifié par Sonmeister, 05 mai 2010 - 02:16 .
The purpose of "int bResult"
Débuté par
Sonmeister
, mai 04 2010 11:12
#1
Posté 04 mai 2010 - 11:12
Please explain the purpose of "int bResult" - anyone...
#2
Posté 05 mai 2010 - 12:09
Unlike regular scripts, plot scripts' main function is int StartingConditional(). This means that the code within that function has to return an integer.
That is the reason there is always a 'int bResult' (or something similar) is defined in the plot script. It usually is defined with a default value of FALSE since the EVENT_TYPE_SET_PLOT events do not expect anything to be returned. In cases where EVENT_TYPE_GET_PLOT is used, the appropriate integer is returned
If your plot script has only EVENT_TYPE_SET_PLOT events, you can skip the declaration and just do a 'return FALSE' at the end of the StartingConditional block.
Edited
That is the reason there is always a 'int bResult' (or something similar) is defined in the plot script. It usually is defined with a default value of FALSE since the EVENT_TYPE_SET_PLOT events do not expect anything to be returned. In cases where EVENT_TYPE_GET_PLOT is used, the appropriate integer is returned
If your plot script has only EVENT_TYPE_SET_PLOT events, you can skip the declaration and just do a 'return FALSE' at the end of the StartingConditional block.
Edited
Modifié par TimelordDC, 05 mai 2010 - 03:19 .
#3
Posté 05 mai 2010 - 01:29
Thank for the new response Timelord, that helps clarify the purpose of int bResult for me!
Modifié par Sonmeister, 05 mai 2010 - 12:52 .





Retour en haut






