11.07.2009, 18:27
I made function, that reads vehicles from file (one vehicle in one file). There are 30 files with vehicles, and i am trying to read from them:
Will this read from all files? /Cars/%s.ini - %s is carname, which is saved. And i get errors:
The lines are:
pawn Код:
new Float:cX, Float:cY, Float:cZ, Float:cA;
new cmodel;
for(new i=1; i<30; i++)
{
new string[256];
format(string, sizeof(string), "/Cars/%s.ini", i);
cX = dini_Get(string, "X");
cY = dini_Get(string, "Y");
cZ = dini_Get(string, "Z");
cA = dini_Get(string, "A");
cmodel = dini_Int(string, "Model");
CreateVehicle(cmodel, cX, cY, cZ, cA, -1, -1, RESPAWN);
}
Код:
C:\DOCUME~1\Arnoldas\Desktop\Serveris\FILTER~1\Market.pwn(59) : error 006: must be assigned to an array C:\DOCUME~1\Arnoldas\Desktop\Serveris\FILTER~1\Market.pwn(60) : error 006: must be assigned to an array C:\DOCUME~1\Arnoldas\Desktop\Serveris\FILTER~1\Market.pwn(61) : error 006: must be assigned to an array C:\DOCUME~1\Arnoldas\Desktop\Serveris\FILTER~1\Market.pwn(62) : error 006: must be assigned to an array
pawn Код:
cX = dini_Get(string, "X");
cY = dini_Get(string, "Y");
cZ = dini_Get(string, "Z");
cA = dini_Get(string, "A");