mIRC Home    About    Download    Register    News    Help

Print Thread
L
littlecramp
littlecramp
L
As above? I tried using
set %captive $comchan($1,1) but it didnt work. However, if i use
/echo -a $comchan($1,1), it still can "echo" the name of the channel to the window!

K
krunch
krunch
K
set %captive $comchan($1,1)
seems to works fine for me, make sure $1 is there

L
littlecramp
littlecramp
L
I couldnt get it to work! As the %captive store the name of the channel, i want to use
/msg %captive watever message to send!

However, it always indicate invalied windows! What's is wrong?

Joined: Dec 2002
Posts: 143
A
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
If I've read correctly from your last post, %captive has now stored the correct channel name...

in which case, if you want to manually reference that variable, you need to type:

//msg %captive bleh

other wise mIRC interperates %captive as plain text and tries to send a message to the channel "%captive" instead of what is in the variable.

so, if you want mIRC to evaluate the variable first, use "//"

Hope it helps?

Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
If you are trying to store $comchan($nick,1) to a variable in a script, you need to use an event that includes $nick (most of them do, but not all). If you wish to use $comchan( ) in the form you have it in the thread topic, then you need to supply the $1 yourself, such as in an alias called with a parameter.

on *:JOIN:#: echo -ti2 $chan * First common channel with $nick is $comchan($nick,1)

alias FirstChan return $comchan($1,1)
//echo -a $FirstChan(Hammer)


Link Copied to Clipboard