Me da un warning al poner la "i".
Код:
public SaveThings()
{
new idx;
new File: file2;
while (idx < sizeof(House))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%s,%s,%d,%d,%d,%d,%d,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
House[idx][Entradax],
House[idx][Entraday],
House[idx][Entradaz],
House[idx][Exitx],
House[idx][Exity],
House[idx][Exitz],
House[idx][Interior],
House[idx][Owner],
House[idx][Descripcion],
House[idx][Comprada],
House[idx][Precio],
House[idx][Alquiler],
House[idx][Time],
House[idx][Cerradura],
House[idx][Armariox],
House[idx][Armarioy],
House[idx][Armarioz],
House[idx][Hueco1],
House[idx][Cantidad1],
House[idx][Hueco2],
House[idx][Cantidad2],
House[idx][Hueco3],
House[idx][Cantidad3],
House[idx][Hueco4],
House[idx][Cantidad4],
House[idx][Hueco5],
House[idx][Cantidad5]);
if(idx == 0)
{
file2 = fopen("houses/houses.cfg", io_write);
}
else
{
file2 = fopen("houses/houses.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
idx = 0;
while (idx < sizeof(Vehicle))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d,%s,%f,%f,%f,%f,%d,%d,%s,%s,%d,%d,%d,%d,%d\n",
Vehicle[idx][Model],
Vehicle[idx][Numberplate],
Vehicle[idx][Positionx],
Vehicle[idx][Positiony],
Vehicle[idx][Positionz],
Vehicle[idx][Angle],
Vehicle[idx][Interior],
Vehicle[idx][Virtual],
Vehicle[idx][Owner],
Vehicle[idx][Description],
Vehicle[idx][Owned],
Vehicle[idx][Time],
Vehicle[idx][Locked],
Vehicle[idx][Colorone],
Vehicle[idx][Colortwo]);
if(idx == 0)
{
file2 = fopen("vehicles/vehicles.cfg", io_write);
}
else
{
file2 = fopen("vehicles/vehicles.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}