I've been importing a few scripts to try them out, and every time, they work fine, but, whenever I try to put in a new script, it completely destroys all other ones I already have in the quest. For example, I put in the roll script, and I can roll fine, but then I insert an NPC script, it works fine, but then I can't roll anymore. How can I prevent this?
Multiple scripts not working?
Started by
Aslion
, Dec 07 2007 09:56 PM
3 replies to this topic
#1
Posted 07 December 2007 - 09:56 PM
#2
Posted 07 December 2007 - 11:00 PM
You need to put ALL of the scripts into ONE .z file. Put the "import std.zh" at the top of that file and just copy and paste the scripts one by one into that one file. Make sure the "import std.zh" is only at the top once and nowhere else.
#3
Posted 07 December 2007 - 11:05 PM
Ah, and ZQuest will just know where the individual scripts end? Would of never though of that.
#4
Posted 08 December 2007 - 04:57 AM
Yes, that's why you have to declare a new script.
When you put
ZScript reads the first line, which declares an ffc script, then reads the name, then reads the brace which opens the script.
Then it reads the last brace (obviously most scripts have a bit more in them =P), telling it the script is closed, and that everything after that script is not part of it.
When you put
CODE
ffc script namehere{
} //end here
} //end here
ZScript reads the first line, which declares an ffc script, then reads the name, then reads the brace which opens the script.
Then it reads the last brace (obviously most scripts have a bit more in them =P), telling it the script is closed, and that everything after that script is not part of it.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users