|
zema Wanderer
Joined: 22 Jun 2005 Posts: 79
|
Posted: Thu Dec 04, 2008 10:26 pm
Script |
Ok so this is the last thing i am having an issue with as far as everything i had working in zmud. I scripted a timer (with some help here) And it's not working right..i may be overlooking something but i cant find it..The timer will fire initally but never stops counting down once it fires. ERROR: Trigger "The multi-colored barrier leaves you." fired but did not compile
That also keeps coming up.
--causes timer to count down--
pattern *1
#ADD wallseconds -1
#IF (@wallseconds <1) {
#ADD wallmins -1
#VAR wallseconds 60
}
#IF (@wallmins <1) {
#ADD wallhours -1
#VAR wallmins 0
}
#IF (@wallhours <1) {#VAR wallhours 24}
--causes timer to reset-- This is not working.
The multi-colored barrier leaves you.
#T- *1
@wallmins = 3
@wallseconds = 14
--causes timer to start--
You form a multi-colored barrier around your body.
#T+ *1 |
|
_________________ There are 3 things i hate kids, animals, and women with attitudes.. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Thu Dec 04, 2008 10:46 pm |
CMud is more syntax-sensitive.
As the first bit of your code is an Alarm, IMO you have 2 choices.
1) Give your alarm a name, for example "WallAlarm"
Then, at places where you use "#t-/+ *1", you'd use "#t+ WallAlarm" or "#t- WallAlarm"
or
2) Use {}'s for #t+ {*1} and/or #t- {*1}.
Of course, if you're set to use the latter, you have to make sure you don't run any other one second alarms.
Otherwise it would get messy very soon.
Hope this helps. |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
zema Wanderer
Joined: 22 Jun 2005 Posts: 79
|
Posted: Thu Dec 04, 2008 11:08 pm well |
I am not really sure where to make the changes it was so long since i wrote the script and the interface for cmud is a little confusing since i have only been using it for a few hours could you please be more specific.
|
|
_________________ There are 3 things i hate kids, animals, and women with attitudes.. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Thu Dec 04, 2008 11:32 pm |
Choose "Settings" tab.
Then the Package Editor will pop up.
At the left side of the Editor, there'd be a huge list of everything you have (Triggers, Aliases etc).
The trigger you need to choose varies depending on with which suggestion you go, though.
Lets say you want to give name to your Alarm "*1".
You need to locate this on the list, as it's a Trigger it will have a Gun sign next to it.
When you click on it, you'll see new data appearing on the right side of the Editor window.
Here you can modify the code you have.
For example, lets give this Alarm a name.
There's a box with ID right below the Type (which is, Alarm)
There you'd type the name of your liking and press Save button on the uppermost panel of the Editor window.
Now that we have given your Alarm a name, we have to find your second trigger.
That looks visually exactly the same way (with Gun icon) but reads your second Trigger's pattern instead
(The multi-colored barrier leaves you.)
Once you've it located, click on it and same stuff opens on the right side.
There you have to modify the line which says
#t- *1
and replace it with
#t- WallAlarm
NOTE: "WallAlarm" is just an example, you can write there any name you feel fitting.
I'm not very good at explaining stuff like that so hopefully it made at least some sense. |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
zema Wanderer
Joined: 22 Jun 2005 Posts: 79
|
Posted: Fri Dec 05, 2008 12:16 am sorry |
Sorry to be so much trouble but that does not seem to be working..What i am finding strange is i have a alias set to reset the timer to the default values example which is.
resettimer ---is what i type in which should reset the values
@wallseconds = 14
@wallmins = 3
Instead of it reseting the values it's sending that info to the mud itself.. |
|
_________________ There are 3 things i hate kids, animals, and women with attitudes.. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Fri Dec 05, 2008 12:38 am |
Correct syntax is
wallseconds=14
wallmins=3
You don't use "@" with Variable in places such as these.
Only place you use it is within #if, say #if (@wallseconds=something) {do stuff} |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Dec 05, 2008 12:41 am |
You use the @ when you want to find out the value of the variable.
You don't use the @ when you're setting the value of the variable with varname = value. |
|
|
|
zema Wanderer
Joined: 22 Jun 2005 Posts: 79
|
Posted: Fri Dec 05, 2008 1:33 am |
Thanks got that fixed. Now i am working on the timer again.
Edit: I was looking through the foums and i found this http://forums.zuggsoft.com/forums/viewtopic.php?t=31951
I made the trigger testing :1 put the echo command in the box and made the alias teston and testoff. I noticed i can turn the trigger on and off, but the echo never appeared..i tested the echo command manually and it worked ok. Could there be a issue with alarms so my timer script is going off but the code inside isent working.. |
|
_________________ There are 3 things i hate kids, animals, and women with attitudes.. |
|
|
|
zema Wanderer
Joined: 22 Jun 2005 Posts: 79
|
Posted: Fri Dec 05, 2008 3:23 pm done |
Ok first off about that echo command i put it all in lowercase..sorry bout that x.x I took everything out and put all the code back in with the name timer, and now everything is working great. Thanks for the help at this rate i think i might be another cmud owner ^ ^
|
|
_________________ There are 3 things i hate kids, animals, and women with attitudes.. |
|
|
|
|
|