@anviska I'm guessing your error is coming from line 126 and you have removed the credits from the top of the script.
bread $sockname 0 $file($sockname).size &mTwitterGetStatus
If this is the case, the problem might not be in the script, but rather your machine not keeping up with the script.
Since this error is occurring inside the on sockclose event, the file $sockname has already been written.
This error is being triggered because $file($sockname).size is returning $null (In other words, the file doesn't exist.
It's my guess that your machine may be delaying file writes for some reason, causing the file to still be unwritten after the script has already told your machine to write it.
Possible causes: Under powered machine being asked to do too much | Slow ide hard drive | mIRC is set at too low of a priority.
I've never seen this error or had it reported, so this is just a guess based on the knowledge of how the script works.
Solutions:
Change the priority of mIRC : http://www.wikihow.com/Change-Process-Priorities-in-Windows-Task-Manager
Change the on sockclose event to this:
On *:sockclose:mTwitterGetStatus: {
if ($file($sockname).size) {
bread $sockname 0 $file($sockname).size &mTwitterGetStatus
var %mcount 1
while ($bintween(&mTwitterGetStatus,{"created_at":,"source":,%mcount)) {
var %tweetinfo $v1, %userinfo $bintween(&mTwitterGetStatus,"user":{,"location":,%mcount)
noop $regex(%tweetinfo,/"id_str":"(.*?)"\x2c"text":"(.*)"/i)
if (!$hget(mirctwitter,Last_ID)) hadd mirctwitter Last_ID 1
if ($regml(1) > $hget(mirctwitter,Last_ID)) { hadd -m mirctwitter Last_ID $regml(1) }
var %id $regml(1), %tweet $regml(2)
noop $regex(%userinfo,/"screen_name":"(.*)"/i)
var %screenname $regml(1)
inc %mcount
var %Method $hget(mIRCTwitter,Method)
if (%Method == echo -at) { %Method $fix&#($+(09<07,%screenname,09>04) %tweet) }
elseif ($me ison $gettok(%Method,3,32)) {
.timer 1 $gettok($sock($sockname).mark,5,32) $gettok(%Method,2-,32) $fix&#($+(09<07,%screenname,09>04) %tweet)
}
else {
if (!$window(@Twitter)) { window -E @Twitter }
var %NextTweet $fix&#($+(09<07,%screenname,09>04) %tweet) 02,08[04RT02]
aline -p @Twitter $timestamp %NextTweet
if ($istok(%NextTweet,$MyTwitterScreenName,32)) {
if (!$window($MyTwitterScreenName)) { window -E $MyTwitterScreenName }
aline -p $MyTwitterScreenName $timestamp %NextTweet
noop $tip(%screenname,Twitter $MyTwitterScreenName,%NextTweet,60,,,,)
}
}
}
.remove $sockname
}
}
note The on sockclose event starts at line 125 and ends at line 154
This assumes that the script is intact an the credits have not been removed.
@FordLawnmower sorry to bother you again. The channel I'm using in Quakenet has +r from time to time. This means no colours are allowed which means the tweets are not shown either. Is there any way I could drop the colour codes from the tweets?
A little update: It's working now! But I still do get that error. Do you know what's it about?