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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Trigger to pull variables from a string
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Trigger to pull variables from a string

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


Posted by KaiserBear   (9 posts)  [Biography] bio
Date Sun 27 Sep 2015 01:47 AM (UTC)
Message
Hello.

I'm trying to pull the value from various skills and I seem to be entering it wrong, I'm not sure what I'm doing wrong. Below is the text I'm trying to make my trigger respond to:

Swords: 59 Unarmed: 12 Dodge: 23

And this is what I have for a trigger, which doesn't even catch the line unfortunately. Can you tell me where I'm going wrong?

<triggers>
<trigger
enabled="y"
match="*Swords: * * "
send_to="12"
sequence="100"
>
<send>swords = %2
SetVariable("Swords", swords)
</send>
</trigger>
</triggers>
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 27 Sep 2015 08:51 AM (UTC)
Message

 match="*Swords: * * "
                    ^
--------------------|


I see a trailing space there that is probably not on the line you are trying to match.

- 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.


1,949 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 FutureQuest]