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
➜ VBscript
➜ 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 page
| Posted by
| Chronoti
USA (27 posts) 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. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) 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 | | Top |
|
| Posted by
| Chronoti
USA (27 posts) Bio
|
| Date
| Reply #2 on Mon 22 Sep 2003 04:17 PM (UTC) |
| Message
| | Nice! It worked! Thanks alot! | | 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,367 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top