mIRC Homepage
Posted By: MauS /var and /set work different? - 24/01/05 03:53 PM
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)
Posted By: JoeDaddy Re: /var and /set work different? - 24/01/05 03:55 PM
try /var %tcCPos = $poscs(%tcE,$mid(%tcOut,%tcI,1),1)

Edit: I put the = in the wrong place .. fixed now.
Posted By: kocam Re: /var and /set work different? - 24/01/05 03:57 PM
The correct sintax to creat local variables is:

var %x = value
Posted By: MauS Re: /var and /set work different? - 24/01/05 04:07 PM
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))
Posted By: tidy_trax Re: /var and /set work different? - 24/01/05 04:11 PM
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)) 
Posted By: MauS Re: /var and /set work different? - 24/01/05 04:14 PM
It works!!!

* MauS hugs tidy_trax, kocam and JoeDaddy.

Thanks a lot, guys!!
© mIRC Discussion Forums