Jump to content

Photo

Multiple scripts not working?


  • Please log in to reply
3 replies to this topic

#1 Aslion

Aslion

    End Fascism

  • Members
  • Real Name:Ryan
  • Location:Plug One's spectacles

Posted 07 December 2007 - 09:56 PM

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?

#2 Plissken

Plissken

    What's with these homies dissing our girls?

  • Members

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 Aslion

Aslion

    End Fascism

  • Members
  • Real Name:Ryan
  • Location:Plug One's spectacles

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 Joe123

Joe123

    Retired

  • Members

Posted 08 December 2007 - 04:57 AM

Yes, that's why you have to declare a new script.

When you put
CODE
ffc script namehere{
} //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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users