mIRC Homepage
Posted By: MadKairon Sockread: * /echo: line too long - 30/03/04 11:45 PM
I'm using Sockets to retrieve info from a web dite. I use the following script to diplay the data on my status window:

on *:sockread:getfile: {
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp) {
echo -a %temp
}
goto nextread
}

but I keep getting this error: * /echo: line too long (line 102, script4.ini)

can anybody give me a hand to solve this please?
Posted By: landonsandor Re: Sockread: * /echo: line too long - 31/03/04 12:15 AM
What does %temp hold? My guess is that %temp is too long to echo
Posted By: MadKairon Re: Sockread: * /echo: line too long - 31/03/04 01:36 AM
/me nodnods

exactly, so, how can I echo it?
Posted By: landonsandor Re: Sockread: * /echo: line too long - 31/03/04 02:41 AM
If the var is too long, you cant. Shorten the variable or break it up OR use another method for data storage
Posted By: Online Re: Sockread: * /echo: line too long - 31/03/04 02:46 AM
var %var
sockread %var
echo -a * $mid(%var,1,900)
if $mid(%var,901) { echo -a * $ifmatch }

-or-

sockread 900 &var
echo -a * $bvar(&var,1-).text

(&var is a binary variable - see /help /sockread and /help binary files)
© mIRC Discussion Forums