mIRC Home    About    Download    Register    News    Help

Print Thread
/var and /set work different? #108961 24/01/05 03:53 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
I have such a command in my script:
/set %tcCPos $poscs(%tcE,$mid(%tcOut,%tcI,1),1)
It works fine.

When i change "/set" to "/var", the command doesn't work:
/var %tcCPos $poscs(%tcE,$mid(%tcOut,%tcI,1),1)
It says: * Invalid format: $poscs (line 71, TransCoder.mrc)

Help me make /var work! I can't use /set because i need the variables unset automatically.

The script is here: http://maus.yiff.ru/hmscript/download/transcoder/TransCoder.mrc
(The comments are in russian)


-= endless in a victory of a yourself =-
Re: /var and /set work different? #108962 24/01/05 03:55 PM
Joined: Oct 2003
Posts: 96
J
JoeDaddy Offline
Babel fish
Offline
Babel fish
J
Joined: Oct 2003
Posts: 96
try /var %tcCPos = $poscs(%tcE,$mid(%tcOut,%tcI,1),1)

Edit: I put the = in the wrong place .. fixed now.

Last edited by JoeDaddy; 24/01/05 03:57 PM.
Re: /var and /set work different? #108963 24/01/05 03:57 PM
Joined: May 2004
Posts: 24
K
kocam Offline
Ameglian cow
Offline
Ameglian cow
K
Joined: May 2004
Posts: 24
The correct sintax to creat local variables is:

var %x = value

Re: /var and /set work different? #108964 24/01/05 04:07 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
Quote:
The correct sintax to creat local variables is:

var %x = value


I changed all /var to /var <%name> = <value>

Now it says * Invalid format: $tc (line 86, TransCoder.mrc)
$tc is the alias with these /var's

Help!!!

PS Lines 86 and 87 are:
if ( $right($editbox($active),1) == $chr(32) ) editbox -ap $tc($editbox($active)
else editbox -a $tc($editbox($active))

Last edited by MauS; 24/01/05 04:10 PM.

-= endless in a victory of a yourself =-
Re: /var and /set work different? #108965 24/01/05 04:11 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Count your brackets, you're missing one:

Code:
 if ( $right($editbox($active),1) == $chr(32) ) editbox -ap $tc($editbox($active)[color:red])[/color]
else editbox -a $tc($editbox($active)) 


New username: hixxy
Re: /var and /set work different? #108966 24/01/05 04:14 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
It works!!!

* MauS hugs tidy_trax, kocam and JoeDaddy.

Thanks a lot, guys!!


-= endless in a victory of a yourself =-