mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 6
J
Jonkka Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: May 2005
Posts: 6
this is maybe simple, but i havent found any solution in the mirc helpfile, dont know if I'm blind :P , but I want a variable to become unchangable for x seconds after it is set, is this possible to do?

Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
no

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
what exactly are you trying to do? It might be possible to stick in a timer and have all your /set commands not occur if the timer is active.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Do you mean something like this?

Code:
alias set {
  if ($var($2)) { return }
  else { set $+(-u,$1) $2 $3- }
}


/set 10 %var [Value]

Sets the variable "%var" which can't be changed and then unsets are N seconds? Or do I have the wrong end of the stick...again? smile

-Andy

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Do you mean unchangeable becuase your own script changes it on you when its in mid process of doing something else with it?
Or do you mean you need to avoid some other persons script altering it, intentionally or accidently?

There are methods to make either of those options harder to happen, but nothing can really ensure it wont get changed, nothing simple in mirc to set it sorry.

Joined: Aug 2004
Posts: 8
G
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
G
Joined: Aug 2004
Posts: 8
set -u60 %var $true

this sets the variable for 1 minute

Last edited by gosan; 20/05/05 11:01 AM.
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Yes but it can still be assigned a new value.

-Andy


Link Copied to Clipboard