mIRC Home    About    Download    Register    News    Help

Print Thread
#38240 25/07/03 01:37 PM
T
TRT
TRT
T
I´m not sure but when i type
//echo $findfile($mircdir,*.mts,0)

i get - * /echo: insufficient parameters

but with
//echo -a $findfile($mircdir,*.mts,0)

it works

#38241 25/07/03 01:50 PM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
One of the optional parameters of echo is a color number. If you prefer not to use -a, you can just use any printable character...I usually use *. /echo requires SOME text work with, so this satisfies that requirement as well.

/echo * $findfile($mircdir, *.mts, 0)
or
/echo * $findfile($mircdir, *.mts, 0) files found

#38242 25/07/03 01:54 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
It's not a bug. If the first parameter /echo receives is a number then it's used as the colour for the following text. Since there's no text following the number in your second example then there's nothing to be echo'ed - so you get an insufficient parameters error. With the -a switch as the first parameter mIRC knows that any numbers after that are part of the text and should no be interpreted as a colour code.

#38243 25/07/03 02:17 PM
C
codemastr
codemastr
C
I don't know, maybe it's just me, but shouldn't mIRC be smart enough to say "hmm they specified a color code, but no text... perhaps they really want to print a number." Not saying it's a bug, it just seems like it could easily be implemented and then these types of problems wouldn't exist.

#38244 25/07/03 03:30 PM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
I agree, i even scripted my own echo alias that does it cool

#38245 03/09/03 11:14 AM
J
JoelPichette
JoelPichette
J
I disagree....

While I debug with the /echo command, i'm happy to see that my variables are $null.

/echo -s $null
/echo -a $null
/echo * $null
and because i always write -s or -a or *,
i dont feel like inventing the weel again.

.... the point is that echo 4 colorize the text in red.... when there is some text.

and

echo hahahaha
leads us to a [syntax error].

--------------
Joel Pichette
Developper for a script that has :tongue:
the look and confort of napster / winmx / kazaa


Link Copied to Clipboard