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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Trigger working, Problem with If statement...

Trigger working, Problem with If statement...

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


Posted by Chronoti   USA  (27 posts)  [Biography] bio
Date Mon 22 Sep 2003 07:18 AM (UTC)
Message
Ok, Now I am new to this VBScript as well as the mushclient programming, (I've used mushclient for quite some time, but haven't messed with the scripting). Anyways, I can't get the if statement to work, I downloaded the windows script help file, and been reading through there... here is the script

world.note "Trigger Launched"
dim i
i=trim(%2)
i=LCase(i)
if i="test" then
world.note "Its a test!"
end if


now, it does actually WORK, but... it doesn't do what its supposed to... what it triggers off of is:

* tells you, '*'.

So if i send myself a tell... it will actually trigger, and note "Trigger Launched", but won't do "its a test!" so... if statement is failing somewhere, that is why I put "trim" and LCase in there, I was thinking *MAYBE* It was one of those... but it still isn't working... any ideas on this problem? Thanks for any help.
[Go to top] top

Posted by Nick Gammon   Australia  (22,982 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 22 Sep 2003 08:02 AM (UTC)
Message
Try changing:

i=trim(%2)

to:

i=trim("%2")

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Chronoti   USA  (27 posts)  [Biography] bio
Date Reply #2 on Mon 22 Sep 2003 04:17 PM (UTC)
Message
Nice! It worked! Thanks alot!
[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,937 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]