I'm trying to combine global scripts, but i have no idea how to do that. Can anyone to help me?
Trying to combine global script
#1
Posted 23 May 2024 - 04:33 PM
#2
Posted 23 May 2024 - 05:17 PM
There's a guide for doing it here. You could also give Moosh's Global Script Organizer a try.
#3
Posted 23 May 2024 - 05:25 PM
Thanks!
#4
Posted 24 May 2024 - 01:02 PM
Okay. I'm using the moosh thing, but when i compile. It says [Error] NewbieBoss.zs Line 3310 @ Columns 3-13 - Error S009: Variable Ghost_CSet has not been declared. Am i missing something?
#5
Posted 24 May 2024 - 01:59 PM
Are you importing ghost.zh in your header? Have you configured the necessary constants within ghost.zh? I believe newbie boss relies on ghost.zh to function, so you'll want to make sure that's being included.
#6
Posted 24 May 2024 - 02:30 PM
I think so... I imported the Ghost2_script.zs. Is there anymore ones i should import? Or am i doing something wrong?
#7
Posted 24 May 2024 - 04:00 PM
You need to import ghost.zh itself. It will import all the sub-files it needs.
#8
Posted 24 May 2024 - 04:05 PM
And... How can i do that?
#9
Posted 24 May 2024 - 06:06 PM
You literally just have to put it as an import. import "std.zh", or include, just like you would with, say, std.zh.
#10
Posted 24 May 2024 - 06:14 PM
Oh. I am trying to combine it with other global scripts.
Sorry for the confusion.
#11
Posted 24 May 2024 - 06:50 PM
Oh. Well that's fairly easy. The ghost global looks basically like this:
global script Ghost{ void run(){ StartGhostZH(); while(true){ UpdateGhostZH1(); Waitdraw(); UpdateGhostZH2(); Waitframe(); } } }
What that means is, with your global, you just need to put StartGhostZH(); before your while(true){, put UpdateGhostZH1(); anywhere between while(true){ and Waitdraw();, and UpdateGhostZH2(); anywhere between Waitdraw(); and Waitframe();.
#12
Posted 24 May 2024 - 07:09 PM
Thank you!
...The Error is still happening...
#13
Posted 24 May 2024 - 07:55 PM
Should i send the full script combo thing?
4 user(s) are reading this topic
0 members, 4 guests, 0 anonymous users