11.02.2013, 21:50
Hello, i'm working on a ingame mapping tool.
I wanted to create a stock, to save the objects.
This is what i have.
But then i got these errors.
I should love it if someone could tell me the problem, or even could fix it!
Rep+
I wanted to create a stock, to save the objects.
This is what i have.
Код:
stock SaveObjects()
{
new idx = 1, File:file;
new string[256];
while(idx < MAX_OBJ)
{
format(string, sizeof(string), "%d|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f|%f\r\n",
ObjInfo[idx][oModel],
ObjInfo[idx][oCX],
ObjInfo[idx][oCY],
ObjInfo[idx][oCZ],
ObjInfo[idx][oCRX],
ObjInfo[idx][oCRY],
ObjInfo[idx][oCRZ],
ObjInfo[idx][oOX],
ObjInfo[idx][oOY],
ObjInfo[idx][oOZ],
ObjInfo[idx][oORX],
ObjInfo[idx][oORY],
ObjInfo[idx][oORZ],
if(idx == 1)
{
file = fopen("objects.cfg", io_write);
}
else
{
file = fopen("objects.cfg", io_append);
}
fwrite(file, string);
fclose(file);
idx++;
}
print("Objects saved successfully.");
return 1;
}
Код:
(2160 -- 2175) : error 029: invalid expression, assumed zero (2175 -- 2176) : error 029: invalid expression, assumed zero (2179) : error 029: invalid expression, assumed zero
Rep+

