mIRC Home    About    Download    Register    News    Help

Print Thread
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.
Joined: Aug 2003
Posts: 144
M
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

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
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.
Joined: Aug 2003
Posts: 144
M
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.

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.

Link Copied to Clipboard