SAMP server keeps closing down when i connect
#4

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.
pawn Код:
new File: fhandle = fopen(...);
fread(fhandle, string);
...
that is wrong. The correct way would be:
pawn Код:
new File: fhandle = fopen(...);
if (fhandle) // valid file handle (not 0)
{
    fread(fhandle, string);
    ...
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)