io_read failure? What is wrong? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: io_read failure? What is wrong? (
/showthread.php?tid=154207)
io_read failure? What is wrong? -
Blt950 - 12.06.2010
Hey, I got a problem with this function. It doesnt seems to load in the correct values from the .cfg file. It only stays at 0 at both.
Which is not correct.
pawn Код:
public LoadStuff()
{
new arrCoords[2][64];
new strFromFile2[256];
new File: file = fopen("/players/ServerSettings.cfg", io_read);
if (file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
TaxMoney = strval(arrCoords[0]);
TaxValue = strval(arrCoords[1]);
fclose(file);
}
return 1;
}
Re: Problem with loading file -
Blt950 - 12.06.2010
Problem solved