GTAMP.com

Grand Theft Auto Multiplayer
It is currently Mon Jan 21, 2019 3:00 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Multi-Scripts
PostPosted: Mon Jun 11, 2012 3:32 pm 
Offline
Ped

Joined: Wed May 23, 2012 12:43 pm
Posts: 4
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...


Top
 Profile  
 
 Post subject: Re: Multi-Scripts
PostPosted: Mon Jun 11, 2012 5:57 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 953
Location: F21B3EED
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".

_________________
My GTA2 related projects:


Top
 Profile  
 
 Post subject: Re: Multi-Scripts
PostPosted: Mon Jun 11, 2012 6:11 pm 
Offline
Ped

Joined: Wed May 23, 2012 12:43 pm
Posts: 4
The error message is as follows:
Quote:
Syntax Error: unrecognized token in scriptfile
Current token = 'LAUNCH_MISSION' on line X


Code:
// 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
...


I also chose LAUNCH_MISSION from the IntelliSense to make sure I have no spelling errors.


Top
 Profile  
 
 Post subject: Re: Multi-Scripts
PostPosted: Mon Jun 11, 2012 6:14 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 953
Location: F21B3EED
Yep, you typed it wrong, check correct typing from the manual:
http://projectcerbera.com/gta/2/tutorials/scripting#LAUNCH_MISSION

_________________
My GTA2 related projects:


Top
 Profile  
 
 Post subject: Re: Multi-Scripts
PostPosted: Mon Jun 11, 2012 6:15 pm 
Offline
Ped

Joined: Wed May 23, 2012 12:43 pm
Posts: 4
Oh! I forgot the parentheses. Sorry :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group