mIRC Home    About    Download    Register    News    Help

Print Thread
creating/evaluating variable w/ tex, $nick, $chan #200952 15/06/08 01:19 PM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
How do I creat a variable %join with $nick and $chan at the end of the %join variable name and then how do I evualuate it? I.E.

set -eu60 %join,$nick,$chan 1

...

if (%join,$nick,$chan) { ... }


I registered; you should too.
Re: creating/evaluating variable w/ tex, $nick, $c [Re: AWEstun] #200954 15/06/08 01:30 PM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
not sure what you are asking...

but try this

set -eu60 $+( %, join, $nick, $chan) 1

good luck

Re: creating/evaluating variable w/ tex, $nick, $chan [Re: AWEstun] #200955 15/06/08 01:31 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
To create it, you can just use:

set -eu60 %join $+ $nick $+ $chan 1

Or, use $+() as:

set -eu60 $+(%,join,$nick,$chan) 1

To access the variable later, you'll need to use $eval():

echo -a $eval($+(%,join,$nick,$chan),2)


Invision Support
#Invision on irc.irchighway.net
Re: creating/evaluating variable w/ tex, $nick, $chan [Re: Riamus2] #200957 15/06/08 01:44 PM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
I was looking at the /help info on $eval .. can you explain what the 2 does? According to the /help file the 2 is the number of times it is evaluated and if there is no number, the defalt is 1. So why would you need to double evualate it?


I registered; you should too.
Re: creating/evaluating variable w/ tex, $nick, $c [Re: AWEstun] #200958 15/06/08 04:30 PM
Joined: Aug 2003
Posts: 144
M
Miguel_A Offline
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Using the Riamus 2 example...

alias test {
;Imagining that the trigger nick is the Riamus2 and the channel is the #mIRC
;This will set a variable named %JoinRiamus2#mIRC with the value 1
set -eu60 $+(%,join,$nick,$chan) 1
;This will evaluated the inside bracked once
;The result will be %JoinRiamus2#mIRC
echo -a $eval($+(%,join,$nick,$chan),1)
,This will evaluated the inside brackets twices
;Firts will evaluated the $+(%,join,$nick,$chan) that will give the %JoinRiamus2#mIRC result
;Second will evalute the result off the firts result the %JoinRiamus2#mIRC that will give as a result 1 ( the variable value"
echo -a $eval($+(%,join,$nick,$chan),2)
}

you can put whatever number you need to put and will always evaluted the result.

Hope you have undertund and sorry about my english.

Re: creating/evaluating variable w/ tex, $nick, $c [Re: Miguel_A] #200960 15/06/08 05:26 PM
Joined: May 2008
Posts: 329
A
AWEstun Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: May 2008
Posts: 329
Thanks, that makes sense.


I registered; you should too.