Problem saving vehicle damage -
cuzido - 29.02.2016
Hi. I'm trying to save the damage on faction vehicles but instead of "0000" or "0101" this is what I'm getting on my .ini files:
"Doors0 = 33554432"
This is my code for saving:
Код:
new panel, door, light, tire;
GetVehicleDamageStatus(FactionInfo[i][Veh][veh], panel, door, light, tire);
FactionInfo[i][DmgPanel][veh] = panel;
FactionInfo[i][DmgDoors][veh] = door;
FactionInfo[i][DmgLights][veh] = light;
FactionInfo[i][DmgTires][veh] = tire;
format(str8, sizeof(str1), "Panels%d", veh);
format(str9, sizeof(str1), "Doors%d", veh);
format(str10, sizeof(str1), "Lights%d", veh);
format(str11, sizeof(str1), "Tires%d", veh);
INI_WriteInt(File,str8, FactionInfo[i][DmgPanel][veh]);
INI_WriteInt(File,str9, FactionInfo[i][DmgDoors][veh]);
INI_WriteInt(File,str10, FactionInfo[i][DmgLights][veh]);
INI_WriteInt(File,str11, FactionInfo[i][DmgTires][veh]);
I've seen only one other topic with similar problems but they didn't have a solution for it.
Anyone knows what could be going wrong?
Re: Problem saving vehicle damage -
cuzido - 01.03.2016
Bump. Anyone?
Re: Problem saving vehicle damage -
smartasspothead - 01.03.2016
Use INI_WriteFloat, and make it float in enum as well.
Re: Problem saving vehicle damage -
cuzido - 01.03.2016
Gave me two warnings:
Код:
warning 213: tag mismatch
warning 213: tag mismatch
The lines are:
Код:
FactionInfo[i][DmgDoors][veh] = door;
FactionInfo[i][DmgTires][veh] = tire;
I changed them to float in enum and used INI_WriteFloat.
it's not working.
Re: Problem saving vehicle damage -
smartasspothead - 02.03.2016
sry about that shit.. use integer instead of float.
and you can use something like this..
PHP код:
GetVehicleDamageStatus(FactionInfo[i][Veh][veh], FactionInfo[i][DmgPanel][veh], FactionInfo[i][DmgDoors][veh], FactionInfo[i][DmgLights][veh], FactionInfo[i][DmgTires][veh]);
witch .ini system do you use?
Re: Problem saving vehicle damage -
cuzido - 02.03.2016
Used it but still got this in my .ini:
And the visual damage still isn't saved.
I'm using Yini.
Re: Problem saving vehicle damage -
cuzido - 03.03.2016
Bump! Anyone?
Re: Problem saving vehicle damage -
cuzido - 05.03.2016
Anyone, please?
I have no idea how to get these values to save properly.
I tried to use "encode_" stuff found on another topic (
https://sampforum.blast.hk/showthread.php?tid=358351) but still no success.