mIRC Home    About    Download    Register    News    Help

Topic Options
#77284 - 31/03/04 12:45 AM Sockread: * /echo: line too long
MadKairon Offline
Pikka bird

Registered: 10/12/02
Posts: 15
Loc: Argentina
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?

Top
#77285 - 31/03/04 01:15 AM Re: Sockread: * /echo: line too long
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
What does %temp hold? My guess is that %temp is too long to echo
_________________________
Those who fail history are doomed to repeat it

Top
#77286 - 31/03/04 02:36 AM Re: Sockread: * /echo: line too long
MadKairon Offline
Pikka bird

Registered: 10/12/02
Posts: 15
Loc: Argentina
/me nodnods

exactly, so, how can I echo it?

Top
#77287 - 31/03/04 03:41 AM Re: Sockread: * /echo: line too long
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
If the var is too long, you cant. Shorten the variable or break it up OR use another method for data storage
_________________________
Those who fail history are doomed to repeat it

Top
#77288 - 31/03/04 03:46 AM Re: Sockread: * /echo: line too long
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
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)

Top