04.05.2012, 08:23
pawn Код:
public LoadStuff()
{
new arrCoords[4][64];
new strFromFile2[128];
new File: file = fopen("Configs/stuff.ini", io_read);
if (file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
Jackpot = strval(arrCoords[0]);
Tax = strval(arrCoords[1]);
TaxValue = strval(arrCoords[2]);
fclose(file);
}
return 1;
}
public SaveStuff()
{
new coordsstring[128];
format(coordsstring, sizeof(coordsstring), "%d,%d,%d", Jackpot,Tax,TaxValue);
new File: file2 = fopen("Configs/stuff.ini", io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}
pawn Код:
C:\DOCUME~1\PEUMEN~1\Desktop\SAMP03~1\GAMEMO~1\BTG.pwn(20194) : warning 219: local variable "file" shadows a variable at a preceding level
C:\DOCUME~1\PEUMEN~1\Desktop\SAMP03~1\GAMEMO~1\BTG.pwn(20198) : error 004: function "split" is not implemented
C:\DOCUME~1\PEUMEN~1\Desktop\SAMP03~1\GAMEMO~1\BTG.pwn(20211) : warning 219: local variable "file2" shadows a variable at a preceding level
pawn Код:
new File: file = fopen("Configs/stuff.ini", io_read);
pawn Код:
split(strFromFile2, arrCoords, ',');
pawn Код:
new File: file2 = fopen("Configs/stuff.ini", io_write);