mIRC Homepage
Posted By: NeUtRoN_StaR question - 28/12/05 12:04 AM
i'd like to set a variable
with the -u switch
and the time for the -u switch
be determined by the contents of another variable

i am unsure of how to accomplish this
any help is appreciated
thankyou
Posted By: RusselB Re: question - 28/12/05 12:07 AM
example:
Code:
var %time = 20
set -u $+ %time %nick nick
  


That will set %nick to nick, then unset it 20 seconds later
Posted By: NeUtRoN_StaR Re: question - 28/12/05 12:11 AM
i knocked this out while waiting for a reply
alias test {
set %testu 10
set $+(-su,$(%testu)) %testv on

i think i was over complicating things
even when i reached a solution i still was smile
Posted By: NeUtRoN_StaR Re: question - 28/12/05 12:15 AM
alias test {
set %testu 10
set -su $+ %testu %testv on
returns
* /set: invalid parameters (line 3, script5.ini)

perhaps i should have mentioned both would be global for now
Posted By: synth7 Re: question - 28/12/05 12:50 AM
Code:
alias test {
  set %t 5
  set [ -u $+ [ %t ] ] %v LOL
  .timer 1 3 echo -a %v
}


Works for me. The timer was just to get the variable contents ('LOL') after 3 seconds to make sure it kept it.
Posted By: DaveC Re: question - 28/12/05 01:06 AM
Quote:
set $+(-su,$(%testu)) %testv on

Thats pretty close to optimal try //set $+(-su,%testu) %testv on
Posted By: NeUtRoN_StaR Re: question - 28/12/05 01:58 AM
works as well
ill have to clean that up in the next update
© mIRC Discussion Forums