Help with script (if elseif and variables) - 03/03/05 04:04 PM
Heres my script:
I want to make a script for all users in my channel, but I cant get it to work and i have problems with this code only. It should message an infoline in format !info -s <help section> -r <results> <searchstring> (e.g. !info -s channelhelp -r 10 i need help). It works but with only 1 paramater (if it shows -s then it wont show -r but i need them together and i have 5 parameters which you can use any way you like). Texts come from dialog boxes.. It's pretty confusing text but I'll hope someone will understand it and help me with it
TIA
s0tt0
Code:
if ($did(12).state == 1) { if ($did(2, seltext) isalnum) { %g, %z, %r if ($did(8, seltext) isnum) { set %r -r $did(8, seltext) } elseif ($did(6, seltext) isalnum) { set %g -g $did(6, seltext) } elseif ($did(4, seltext) isalnum) { set %z -s $did(4, seltext) } msg #mychannel !info %g %z %r $did(2, seltext) } else { if ($did(2, seltext) isalnum) { msg #mychannel !info $did(2, seltext) } } }
I want to make a script for all users in my channel, but I cant get it to work and i have problems with this code only. It should message an infoline in format !info -s <help section> -r <results> <searchstring> (e.g. !info -s channelhelp -r 10 i need help). It works but with only 1 paramater (if it shows -s then it wont show -r but i need them together and i have 5 parameters which you can use any way you like). Texts come from dialog boxes.. It's pretty confusing text but I'll hope someone will understand it and help me with it
TIA
s0tt0