mIRC Home    About    Download    Register    News    Help

Print Thread
#96147 30/08/04 03:52 AM
Joined: Dec 2002
Posts: 4
W
Self-satisified door
OP Offline
Self-satisified door
W
Joined: Dec 2002
Posts: 4
I love the $v1 and $v2 identifiers, they sure simplify alot of my code. But why cant i use $v3 $v4 or any $vN value that i may have in an if/elseif statement?. smile

#96148 30/08/04 08:44 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
That's not a bad idea and maybe this is the begining. And maybe we'll be able to do $v1- in the future or $v1-3 type of thing. Im guessing you cant use them cause they've not been implemented yet though that and the comments I jsut made would make sence and would love to see them all implemented


Those who fail history are doomed to repeat it
#96149 30/08/04 10:57 AM
Joined: Dec 2002
Posts: 349
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
I'm not sure I understand, where would the 3rd (and so on) parameters be coming from? (none of the if operators have more than two parameters)

#96150 30/08/04 11:10 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
well, say you have:

if (condition1) || (condition2) || (condition3) || (condition4) || (condition5)

and you wanted to get exactly which conditions activated the script. Like a bad channel kicker for example, sometimes more than one bad channel can exist in a comparison and while a properly written bad channel kicker would only kick once, that doesnt mean 12 channels were considered bad. So if we had $v1 $v2 etc etc we could capture all the bad channels. Now Im willing to bet there's a scripted way to do this and Im sure it'd be small considering some of the people's knowledge here, but still, it would be nice to get all the different matches on a comparison


Those who fail history are doomed to repeat it
#96151 30/08/04 11:35 AM
Joined: Dec 2002
Posts: 349
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
Ok I understand now, however with your example the parser would stop at the first matching ||, so only $v1/$v2 would be filled anyway. smile

A similar feature would be to allow variables to be initialised or set inside an if statement.

#96152 30/08/04 12:00 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
yeah, I dont always use the best exmples, but fortunately you got my point smile


Those who fail history are doomed to repeat it

Link Copied to Clipboard