Hey Guys...
I'm making a map and the script file is called "gangs.mis", and to make the code more readable I wanted to put some functionality in separate script files. So I made a folder and called it "gangs" (like the main script) and made a new script file inside that folder called gangs_callgang.mis. When I use LAUNCH_MISSION in the main script the compiler doesn't recognize this command. How can I implement this thing?
Another question is that if I have some objects declared and created in the main script, can I use them in the "little" script without declaring them again?
Thanks in advance...
Multi-Scripts
Re: Multi-Scripts
Try putting the mission files in the compiler directory? What error message it gave? Check the manual if you typed it correctly. Also, show your code at the LAUNCH_MISSION line.
Yes, you can refer to objects from the main script in the "little script".
Yes, you can refer to objects from the main script in the "little script".
My GTA2 related projects:
Re: Multi-Scripts
The error message is as follows:
I also chose LAUNCH_MISSION from the IntelliSense to make sure I have no spelling errors.
Syntax Error: unrecognized token in scriptfile
Current token = 'LAUNCH_MISSION' on line X
Code: Select all
// gangs.mis
...
IF((IS_CHAR_IN_ZONE(Pa, SendGang)) AND (ganga_created = 0))
IF(CHECK_SCORE_GREATER(Pa, 9999))
ADD_SCORE(Pa, -10000)
LAUNCH_MISSION callgang
// Where the mission script file is gangs_callgang.mis in the subfolder gangs
ENDIF
ENDIF
...
Re: Multi-Scripts
Yep, you typed it wrong, check correct typing from the manual:
http://projectcerbera.com/gta/2/tutoria ... CH_MISSION
http://projectcerbera.com/gta/2/tutoria ... CH_MISSION
My GTA2 related projects:
Re: Multi-Scripts
Oh! I forgot the parentheses. Sorry