mIRC Home    About    Download    Register    News    Help

Print Thread
#134157 29/10/05 08:41 AM
Joined: Oct 2005
Posts: 4
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Oct 2005
Posts: 4
I have a problem with a variable. I have a dialog window and I need to /set variable that variable name is equal to my current nickname.
Example:
if my nickname is "test1" on press OK execute "/set %test1"
then change my nickname to "test2" and on press OK execute "/set %test2"
How to do this ?

#134158 29/10/05 08:56 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Code:
on *:dialog:[color:red]dialogs_name[/color]:sclick:[color:red]ID#_of_OK_button[/color]: {
  set % [ $+ [ $me ] ]
}


This will set a variable to whatever nick you are currently on when you press the "OK" button.

Just make sure you replace the red color with the actual information.

For more information, type: /help brackets

#134159 29/10/05 09:09 AM
Joined: Oct 2005
Posts: 54
B
Babel fish
Offline
Babel fish
B
Joined: Oct 2005
Posts: 54
oh god, all i've ever gotten out of evaluation barackets is trouble
i'd suggest removing them =\
Code:
on *:dialog:[color:red]dialogs_name[/color]:sclick:[color:red]ID#[/color]: {
  set % $+ $me 
}


Chat NSN
My Server: sleepystickman.ircxpro.com
#134160 29/10/05 09:29 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
I've been using them for a long time, and have never had any trouble with them.

#134161 29/10/05 11:18 AM
Joined: Oct 2005
Posts: 4
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Oct 2005
Posts: 4
10x laugh

#134162 29/10/05 11:25 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Yes,

u used them in the correct way, so there's nothing wrong with it. Just that they are obsolete when setting a variable, evaluation brackets are never needed there. Only when referencing the value of a dynamic variable (or you could just use $eval), or when unsetting a dynamic variable. Even though sometimes /unset actually works without eval brackets there are cases where it in fact doesn't work, so for unsetting one should always include the evaluation brackets where necessary.


Gone.

Link Copied to Clipboard