Error need some help
#1

The code is line 1505 to 1536 can anyone tell me why I am getting this expression is assumed zero?

(1512 -- 1523) : error 029: invalid expression, assumed zero
(1523 -- 1524) : error 029: invalid expression, assumed zero
(1527) : error 029: invalid expression, assumed zero

Код:
public SaveDynamicCars()
{
	new idx = 1;
	new File: file2;
	while (idx < sizeof(DynamicCars))
	{
		new coordsstring[512];
		format(coordsstring, sizeof(coordsstring), "%d|%f|%f|%f|%f|%d|%d|%d|%d|%s|%s|%d|%d|%d\n",
		DynamicCars[idx][CarModel],
		DynamicCars[idx][CarX],
		DynamicCars[idx][CarY],
		DynamicCars[idx][CarZ],
		DynamicCars[idx][CarAngle],
		DynamicCars[idx][CarColor1],
		DynamicCars[idx][CarColor2],
		DynamicCars[idx][FactionCar],
		DynamicCars[idx][CarType],

		if(idx == 1)
		{
			file2 = fopen("Cars/carspawns.cfg", io_write);
		}
		else
		{
			file2 = fopen("Cars/carspawns.cfg", io_append);
		}
		fwrite(file2, coordsstring);
		idx++;
		fclose(file2);
	}
	return 1;
}
Reply
#2

did you forward savedynamiccars ?
Reply
#3

pawn Код:
public SaveDynamicCars()
{
    new idx = 1;
    new File: file2;
    while (idx < sizeof(DynamicCars))
    {
        new coordsstring[512];
        format(coordsstring, sizeof(coordsstring), "%d|%f|%f|%f|%f|%d|%d|%d|%d\n",
        DynamicCars[idx][CarModel],
        DynamicCars[idx][CarX],
        DynamicCars[idx][CarY],
        DynamicCars[idx][CarZ],
        DynamicCars[idx][CarAngle],
        DynamicCars[idx][CarColor1],
        DynamicCars[idx][CarColor2],
        DynamicCars[idx][FactionCar],
        DynamicCars[idx][CarType],

        if(idx == 1)
        {
            file2 = fopen("Cars/carspawns.cfg", io_write);
        }
        else
        {
            file2 = fopen("Cars/carspawns.cfg", io_append);
        }
        fwrite(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;
}
Let me know if it worked
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)