There are several rules of CLEO:
Remember, you must follow these rules!
So
Would be replaced with:
When witting a CLEO script.
In a mission you must NEVER do this:
It should be:
One file – one thread. Each CLEO script must be made as a single thread compiled in a single file. If you need more threads for your script, use the opcodes 004F or 0A92, depending on where that additional thread is located in - in the main.scm or separate .cs file.
Never use opcode 004E in the CLEO threads. They work separately from the common threads, so using this opcode will cause an error. Use the opcode 0A93, if you need to stop a CLEO script. Conversely, never use opcode 0A93 in the CLEO missions, but instead use 004E to cancel a mission.
Remember, you must follow these rules!
So
- Code:
004E: end_thread
Would be replaced with:
- Code:
0A93: end_custom_thread
When witting a CLEO script.
In a mission you must NEVER do this:
- Code:
0050: gosub @MissionStart
00d6: if
0112: wasted_or_busted // mission only
004d: jump_if_false @MissionEnd
0050: gosub @MissionFailed
:MissionEnd
0050: gosub @MissionCleanup
// THIS IS WRONG!!
0A93: end_custom_thread
It should be:
- Code:
0050: gosub @MissionStart
00d6: if
0112: wasted_or_busted // mission only
004d: jump_if_false @MissionEnd
0050: gosub @MissionFailed
:MissionEnd
0050: gosub @MissionCleanup
004e: end_thread