mIRC Homepage
Posted By: Jigsy /var -g bug? - 10/12/08 12:52 AM
//var -guN %1 = A, %2 = B

Will not unset after N seconds, which I think it should.


Flames/opinions/whatever?
Posted By: argv0 Re: /var -g bug? - 10/12/08 03:00 AM
what "should", in your opinion, be unset... %A or %B, or both? I don't think it's clear in that example which would be the intended behaviour-- which is probably why mIRC chooses none.
Posted By: Horstl Re: /var -g bug? - 10/12/08 06:47 AM
Seconded... as "//var -sguN %1 = A, %2 = B" shows both results, imho it's clear what the *intended* behavior is. smile

Posted By: Jigsy Re: /var -g bug? - 10/12/08 01:30 PM
Yeah, sorry, I meant both. :X
Posted By: RoCk Re: /var -g bug? - 10/12/08 02:25 PM

IMO, it should just do as it's told and unset both. If the user doesn't want both to be unset then they can set the other(s) with a separate command.
Posted By: hixxy Re: /var -g bug? - 11/12/08 02:41 PM
I agree. It should apply to all variables in the list.

If somebody wants to unset two variables after 5 seconds, but also set a permanent one, then they could simply do:

Code:
//var -gu5 %1 = A, %2 = B | var -g %3 = C

Posted By: Siefer414 Re: /var -g bug? - 12/12/08 09:20 PM
What does a global variable do that's different from a regular one?
Posted By: starbucks_mafia Re: /var -g bug? - 12/12/08 09:58 PM
Well it's not a case of global versus regular, but rather a case of global versus local.

A local variable only exists within the scope it is created - it is only accessible within the function/event/etc that created it and it is immediately unset once that function/event/etc ends. Global variables are accessible from anywhere and are permanent unless explicitly unset with the unset command.
© mIRC Discussion Forums