mIRC Homepage
Posted By: Withinside $vN! - 30/08/04 03:52 AM
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
Posted By: landonsandor Re: $vN! - 30/08/04 08:44 AM
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
Posted By: Skip Re: $vN! - 30/08/04 10:57 AM
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)
Posted By: landonsandor Re: $vN! - 30/08/04 11:10 AM
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
Posted By: Skip Re: $vN! - 30/08/04 11:35 AM
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.
Posted By: landonsandor Re: $vN! - 30/08/04 12:00 PM
yeah, I dont always use the best exmples, but fortunately you got my point smile
© mIRC Discussion Forums