Trigger working, Problem with If statement...

Posted by Chronoti on Mon 22 Sep 2003 07:18 AM — 3 posts, 13,982 views.

USA #0
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.
Australia Forum Administrator #1
Try changing:

i=trim(%2)

to:

i=trim("%2")
USA #2
Nice! It worked! Thanks alot!