mIRC Home    About    Download    Register    News    Help

Print Thread
#211600 25/04/09 12:05 AM
Joined: Jan 2009
Posts: 4
J
jimmyo Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jan 2009
Posts: 4
Hi folks - I am just getting going with scripts and am having some basic problems. I have put the following into the 'remote' section:
Alias gimmeback {
var %temp = this is a test
if ($2 == 5) return %temp
}
and then if I enter:
//echo $gimmeback(kkkk,5)
the channel displays:
this is a test

So far, so good. However if I change it to:

Alias gimmeback {
var %temp = 3
if ($2 == 5) return %temp
}
and type:
//echo $gimmeback(kkkk,5)

I get an error message that says:
* /echo: insufficient parameters

It seems to work with text in the variable, but not anything numerical - eg $calc(3) gives the same error.

Thanks in advance for any help you can provide.

Jim


Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
The "3" is interpreted as the line color parameter. As no text-to-color follows, mIRC prints the error.
Quoting the helpfile:
Quote:
/echo [color] [-cdeghiNtsaqlbfnmr] [color name] [#channel|[=]nick] <text>
Prints text in the specified window using the specified color (0 to 15).
To bypass this issue either specifiy a target (like /echo #somewhere <yourtext>) or use any switch (like /echo -q <yourtext>). "/echo -a <text>" is the most common method. Alternatively you can prefix the desired <text> "3" with a valid color number, so the first number will be [color] and the second number the <text>. smile

Last edited by Horstl; 25/04/09 02:10 AM.
Joined: Jan 2009
Posts: 4
J
jimmyo Offline OP
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Jan 2009
Posts: 4
Ahh - Got it! Thanks.


Link Copied to Clipboard