24.04.2015, 17:10
https://sampwiki.blast.hk/wiki/Fread
Invalid file handle crashed your server, in other words the file could not be opened and you're trying to read from a closed file.
Re-compile the script with debug info as I mentioned above to get the exact line otherwise it'll be harder to fix it because the only thing we know is that it was in OnPlayerConnect.
By the way, an example of what I meant before.
that is wrong. The correct way would be:
Invalid file handle crashed your server, in other words the file could not be opened and you're trying to read from a closed file.
Re-compile the script with debug info as I mentioned above to get the exact line otherwise it'll be harder to fix it because the only thing we know is that it was in OnPlayerConnect.
By the way, an example of what I meant before.
pawn Код:
new File: fhandle = fopen(...);
fread(fhandle, string);
...
pawn Код:
new File: fhandle = fopen(...);
if (fhandle) // valid file handle (not 0)
{
fread(fhandle, string);
...
}