Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ can someone tell me why this trigger wont run?
|
can someone tell me why this trigger wont run?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Jordan
(14 posts) Bio
|
| Date
| Fri 14 Sep 2007 06:19 AM (UTC) Amended on Fri 14 Sep 2007 06:20 AM (UTC) by Jordan
|
| Message
| heres the line it runs off of and that i made my trig from
STR: 14 INT: 17 WIS: 12 DEX: 17 CON: 19 CHA: 15
heres my trig
<triggers>
<trigger
custom_colour="2"
enabled="y"
match="STR: * INT: * WIS: * DEX: * CON: * CHA: *"
send_to="12"
sequence="100"
>
<send>if (%1 + %2 + %3 + %4 + %5 + %6) < 102 then
Send "Y"
else
Send "N"
end if</send>
</trigger>
</triggers>
and i keep gettin some wierd error i dont understand
EDIT : [string "Trigger: "]:5: unexpected symbol near '<eof>'... thats the error if ya needed it :
thx | | Top |
|
| Posted by
| Jordan
(14 posts) Bio
|
| Date
| Reply #1 on Fri 14 Sep 2007 06:33 AM (UTC) |
| Message
| | not sure if this is the correct fix... but by removin the if in the end if it ran like it should at last it looked like it did.... any thoughts? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Fri 14 Sep 2007 07:14 AM (UTC) |
| Message
| In Lua, you end an "if" with just "end".
You may be used to VBscript where you have endif, or you may have seen some of the examples where I put "end -- if". The "--" is a comment, designed to let you know what you are ending. For example:
if (%1 + %2 + %3 + %4 + %5 + %6) < 102 then
Send "Y"
else
Send "N"
end -- if
|
- 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.
13,208 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top