Gammon Forum
Entire forum
MUSHclient
General
Random error causing trigger to break
Random error causing trigger to break
|
It is now over 60 days since the last post. This thread is closed.
 
Refresh page
Posted by
| Xandler
(47 posts) bio
|
Date
| Sat 21 Aug 2021 05:08 PM (UTC) |
Message
| Okay, so I have this trigger here that just randomly decides to break and I can't figure out why
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="mobstomove"
match="You let everyone know that you're ready."
regexp="y"
send_to="12"
sequence="100"
>
<send> if @ppl <= 60 then
Send ("--")
Execute ("tranquil")
Send ("power up")
Send ("power up")
Send ("power up")
Send ("power up")
Send ("sense @target")
else
if @pki <= 25 then
Send ("--")
Execute ("tranquil")
Send ("Swallow senzu")
Send ("sense @target")
else
if @fatigue >= 50 then
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("drink 99.bottle")
Send ("sense @target")
else
Send ("sense @target")
end
end
end</send>
</trigger>
</triggers>
The error I get is:
Compile error
World: Dragonball Evolution
Immediate execution
[string "Trigger: "]:18: unexpected symbol near '>='
The thing with is it will work nearly 95% of the time even when that line is true, then it will just suddenly throw that error when that line is true or even when it's false. I just don't understand what's going on. It doesn't break all the time, just randomly and I've used the >= sign in other triggers and they all work properly. What am I missing? | top |
|
Posted by
| Nick Gammon
Australia (22,928 posts) bio
Forum Administrator |
Date
| Reply #1 on Sat 21 Aug 2021 08:09 PM (UTC) Amended on Sat 21 Aug 2021 08:20 PM (UTC) by Nick Gammon
|
Message
| Probably fatigue has a space or something non-numeric (or nothing at all) in it. Check that you only put numbers into fatigue.
If it's from a trigger it might have a comma in it (eg. 1,500). When you capture fatigue make sure it is only digits, and remove any commas.
As a debugging technique, as soon as the trigger fails, and you can see that line 18 is the one with @fatigue in it, use the configuration window to see what value is in the fatigue variable. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
5,280 views.
It is now over 60 days since the last post. This thread is closed.
 
Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.