Global and Local Variables:
Local Variables:
Local Variables are denoted by a @
Their values are available only within the current thread.
Scripts and external scripts have a setback of 0@ to 33@ in San Andreas. 32@ and 33@ are denoted as local timers have should NOT be used or anything
else.
San Andreas missions have a much bigger setback than it's threads. SA missions uses locals in range of 0@ to 1023@
Global Variables:
Global Variables are denoted by a $ sign (dollar)
Their values are available from any place of a code. You must NOT use them for different things in main.scm
In CLEO scripts Global Variables can make crashes, or bugs. The only ones which should(can) be used are:
Beware that these Globals below have the same meaning as what they are pointing too! So be careful you do not use them for anything else.
Also if you're using these in normal main be careful that you do NOT use one which is used for something else. Check first!
CLEO 3 Rules:
Rules
1: No Globals other than the ones I spoke about above(and ones from the CustomVariables.txt).
2: Use 0A93: to end a CLEO thread not 004E: ( 0A93 =-> 0A93: end_custom_thread, 004E =-> 004E: end_thread )
3: In a mission script do not use 0A93: to end the mission, you must use 004E: like normal.
4: To compile a CLEO script as *.cs (custom script) use -> {$CLEO} or -> {$CLEO .cs}
5: To compile a CLEO mission script *.cm (custom mission) use -> {$CLEO .cm}
The starter pack of the mission you must start the mission with 0A94: (starter pack is normal thread so it should be a *.cs file)
Write the name of the *.cm you want to start *.cm is not needed as the opcode will search for the file with the extant.
Missions are not recommended for newbies.
Local Variables:
Local Variables are denoted by a @
Their values are available only within the current thread.
Scripts and external scripts have a setback of 0@ to 33@ in San Andreas. 32@ and 33@ are denoted as local timers have should NOT be used or anything
else.
San Andreas missions have a much bigger setback than it's threads. SA missions uses locals in range of 0@ to 1023@
Global Variables:
Global Variables are denoted by a $ sign (dollar)
Their values are available from any place of a code. You must NOT use them for different things in main.scm
In CLEO scripts Global Variables can make crashes, or bugs. The only ones which should(can) be used are:
- Code:
$PLAYER_CHAR
$PLAYER_ACTOR
$ONMISSION
Beware that these Globals below have the same meaning as what they are pointing too! So be careful you do not use them for anything else.
- Code:
$2 -> $PLAYER_CHAR
$409 -> $ONMISSION
$3 -> $PLAYER_ACTOR
Also if you're using these in normal main be careful that you do NOT use one which is used for something else. Check first!
CLEO 3 Rules:
Rules
1: No Globals other than the ones I spoke about above(and ones from the CustomVariables.txt).
2: Use 0A93: to end a CLEO thread not 004E: ( 0A93 =-> 0A93: end_custom_thread, 004E =-> 004E: end_thread )
3: In a mission script do not use 0A93: to end the mission, you must use 004E: like normal.
4: To compile a CLEO script as *.cs (custom script) use -> {$CLEO} or -> {$CLEO .cs}
5: To compile a CLEO mission script *.cm (custom mission) use -> {$CLEO .cm}
The starter pack of the mission you must start the mission with 0A94: (starter pack is normal thread so it should be a *.cs file)
Write the name of the *.cm you want to start *.cm is not needed as the opcode will search for the file with the extant.
Missions are not recommended for newbies.