Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Why isn't this script working?

Author
Message
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 12th Feb 2012 00:04


ANY help will be greatly appreciated.
D0MINIK
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 12th Feb 2012 03:38
There's a typo in line 2

:state=2:timergreater=7500:


Besides, this is really no way of asking for help in my oppinion. You rather should explain what your script does instead of just stating it's not working.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Feb 2012 05:05
First, you have syntax mistakes in the script. You have three colons which are invalid here: ":state=2:timergreater=7500:" where it should be ":state=2,timergreater=7500:".

This line: ":state=0:plrwithinzone=1,timerstart,state=2" is also incorrect. It should be ":state=0,plrwithinzone=1:timerstart,state=2". You had a colon in the wrong location.

Second, your layout is all wrong. You should define the huds first in the ":state=0:" lines, then start the script from that point.

Like this:



If you use a layout when scripting like the above, then if you need to add huds you can with ease because the "state=0" lines are designated for defining huds and will not mess up the rest of your script lines.

Next you should use "etimerstart" and "etimergreater=x" instead of the "timerstart" and "timergreater=x". So the next lines could be like this:



That should help get you going. Remember scripting is like programming an application and needs a bit of format/neatness to find any issues. It is good practice to always...

1. If using hud images, use the ":state=0:" lines to define huds
2. Once all hud(s) are defined, use the "state=0:state=1" and start the rest of your script from there.
3. Use "etimerstart" and "etimergreater=x" instead of the old "timerstart/timergreater=x". The reason- if you have more than one script running the old "timer", they will interfere and conflict with one another (in other words only one timer can run until done). You can have more than one "etimer" running at the same time with no issues.


Twitter: @NFoxMedia
Cross Hair Games
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Canada Eh\'
Posted: 12th Feb 2012 06:23
Healthbar hud? Recently did my own, there pretty picky, try what Fox says, if it still isnt working I'll look at it, but I'm fairly confident what BlackFox says will work

A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 12th Feb 2012 17:52
Thanks Blackfox! Your tips and corrections work!
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Feb 2012 19:15
Glad to be of help.


Twitter: @NFoxMedia

Login to post a reply

Server time is: 2024-11-27 19:26:44
Your offset time is: 2024-11-27 19:26:44