19.04.2011, 16:04
Will not just y_ini re-write a line if are there any spaces between each word?
I'm checking for vehicles on save and getting their positions:
And there are spaces I chose on:
And there aren't any spaces on the line "Angle", which is re-writen, and not created a new line, as happens on those one which a space. Result:
Is that a bug or am I doing anything wrong? I didn't know if I explained this problem well, but hope can be helped. Thanks,
I'm checking for vehicles on save and getting their positions:
pawn Код:
format(CarFile,sizeof(CarFile),system,v);
GetVehicleColor(v, color1, color2);
GetVehiclePos(v, x, y, z);
GetVehicleZAngle(v, a);
ini = INI_Open(CarFile);
INI_WriteFloat(ini, "Pos X", x);
INI_WriteFloat(ini, "Pos Y", y);
INI_WriteFloat(ini, "Pos Z", z);
INI_WriteFloat(ini, "Angle", a);
INI_WriteInt(ini, "Color 1", color1);
INI_WriteInt(ini, "Color 2", color2);
INI_Close(ini);
Код:
Pos X // I mean there's a space between "Pos" and "X" Pos Y Pos Z Color 1 Color 2
Код:
Owner = The_Fel Id = 1 Pos X = 2118.627929 Pos Y = 853.180603 Pos Z = 6.445911 Angle = 269.294097 // Hasn't been created a new line Color 1 = 158 Color 2 = 130 Locked = false Plate = The_Fel Pos X = 2186.102539 // Line duplicated, such as Pos Y, Pos Z, Color 1, Color 2 Pos Y = 852.537536 Pos Z = 6.465250 Color 1 = 158 Color 2 = 130