Is this ok ?
#1

Quote:

public LoadStuff()
{
new arrCoords[4][64];
new strFromFile2[256];
new File: file = fopen("stuff.ini", io_read);
if (file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
Jackpot = strval(arrCoords[0]);
fclose(file);
}
else
{
GameModeExit();
}
return 1;
}

public SaveStuff()
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d", Jackpot);
new File: file2 = fopen("stuff.ini", io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}

1. Is the code ok ?
2. What will happen if i change new coordsstring[256]; 256 to 128 ? nothing ?
Reply


Messages In This Thread
Is this ok ? - by Jimbo01 - 30.07.2010, 13:26
Re: Is this ok ? - by willsuckformoney - 30.07.2010, 13:40
Re: Is this ok ? - by mihaitza55 - 30.07.2010, 13:41
Re: Is this ok ? - by willsuckformoney - 30.07.2010, 13:42
Re: Is this ok ? - by mihaitza55 - 30.07.2010, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)