[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  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] Refresh page


Posted by Jordan   (14 posts)  [Biography] 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) &lt; 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
[Go to top] top

Posted by Jordan   (14 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] 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
[Go to top] 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.


9,557 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]