Need Help! - 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)
+--- Thread: Need Help! (
/showthread.php?tid=475526)
Need Help! -
NewCityRoleplay - 13.11.2013
How do I fix this?
Код:
stock SaveAPoint()
{
if(!fexist("ArrestPoints.cfg")) fcreate("ArrestPoints.cfg");
new idx = 1, File:file;
new string[256];
while(idx < MAX_ARRESTPOINTS)
{
format(string, sizeof(string), "%d|%d|%d|%s\r\n",AInfo[idx][arX],AInfo[idx][arY],[AInfo[idx][arZ],AInfo[idx][arName]);
if(idx == 1)
{
file = fopen("ArrestPoints.cfg", io_write);
}
else
{
file = fopen("ArrestPoints.cfg", io_append);
}
fwrite(file, string);
fclose(file);
idx++;
}
print("Arrest Points Saved.");
return 1;
}
And these are the Errors I get.
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : error 029: invalid expression, assumed zero
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : warning 215: expression has no effect
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : warning 215: expression has no effect
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : error 001: expected token: ";", but found ")"
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : error 029: invalid expression, assumed zero
C:\Users\Nathan Cooper\Desktop\ncrp.pwn(103962) : fatal error 107: too many error messages on one line
Re: Need Help! -
Kimossab - 13.11.2013
I guess the problem is in "format" you got it like this:
"[AInfo[idx][arZ],"
I think it shouldn't have the "[" up there.