mIRC Home    About    Download    Register    News    Help

Print Thread
#138288 28/12/05 12:04 AM
N
NeUtRoN_StaR
NeUtRoN_StaR
N
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

#138289 28/12/05 12:07 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
example:
Code:
var %time = 20
set -u $+ %time %nick nick
  


That will set %nick to nick, then unset it 20 seconds later

#138290 28/12/05 12:11 AM
N
NeUtRoN_StaR
NeUtRoN_StaR
N
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

Last edited by NeUtRoN_StaR; 28/12/05 12:12 AM.
#138291 28/12/05 12:15 AM
N
NeUtRoN_StaR
NeUtRoN_StaR
N
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

#138292 28/12/05 12:50 AM
S
synth7
synth7
S
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.

#138293 28/12/05 01:06 AM
D
DaveC
DaveC
D
Quote:
set $+(-su,$(%testu)) %testv on

Thats pretty close to optimal try //set $+(-su,%testu) %testv on

#138294 28/12/05 01:58 AM
N
NeUtRoN_StaR
NeUtRoN_StaR
N
works as well
ill have to clean that up in the next update


Link Copied to Clipboard