Y_ini floats not loading -
ikbenremco - 04.11.2013
Hai, My floats aren't loading for a strange reason
I did put a printf in there for a debug and it's printing it like 6 times? can someone explain why so?
.ini file:
PHP код:
PositionX = 1154.375244
PositionY = -1759.874877
PositionZ = 16.297098
debug :
code:
PHP код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",pInfo[playerid][pPass]);
INI_Float("PositionX", pInfo[playerid][PosX]);
INI_Float("PositionY", pInfo[playerid][PosY]);
INI_Float("PositionZ", pInfo[playerid][PosZ]);
printf("Player loaded ; %f | %f | %f", pInfo[playerid][PosX], pInfo[playerid][PosY], pInfo[playerid][PosZ]);
INI_Float("Angle", pInfo[playerid][pAngle]);
INI_Int("Interior", pInfo[playerid][pInterior]);
INI_Int("IP", pInfo[playerid][pIP]);
INI_Int("VirtualWorld", pInfo[playerid][pVirtualWorld]);
INI_Int("Registered", pInfo[playerid][pRegistered]);
INI_Int("Cash",pInfo[playerid][pCash]);
INI_Int("OnDuty",pInfo[playerid][pOnDuty]);
INI_Int("Stealthed",pInfo[playerid][pStealthed]);
INI_Int("Bank",pInfo[playerid][pAccount]);
INI_Float("Armor",pInfo[playerid][pArmor]);
INI_Float("Health",pInfo[playerid][pHealth]);
INI_Int("Gender",pInfo[playerid][pGender]);
INI_Int("Admin",pInfo[playerid][pAdmin]);
INI_Int("Helper",pInfo[playerid][pHelper]);
INI_Int("Rank",pInfo[playerid][pRank]);
INI_Int("Leader",pInfo[playerid][pLeader]);
INI_Int("Faction",pInfo[playerid][pFaction]);
INI_Int("Age",pInfo[playerid][pAge]);
INI_Int("Respects",pInfo[playerid][pRespects]);
INI_Int("PayDay",pInfo[playerid][pPayDay]);
INI_Int("Level",pInfo[playerid][pLevel]);
INI_Int("Member",pInfo[playerid][pMember]);
INI_Int("Kills",pInfo[playerid][pKills]);
INI_Int("Deaths",pInfo[playerid][pDeaths]);
INI_Int("Weapon0",pInfo[playerid][pWeapon0]);
INI_Int("Ammo0",pInfo[playerid][pWeapon0a]);
INI_Int("Weapon1",pInfo[playerid][pWeapon1]);
INI_Int("Ammo1",pInfo[playerid][pWeapon1a]);
INI_Int("Weapon2",pInfo[playerid][pWeapon2]);
INI_Int("Ammo2",pInfo[playerid][pWeapon2a]);
INI_Int("Weapon3",pInfo[playerid][pWeapon3]);
INI_Int("Ammo3",pInfo[playerid][pWeapon3a]);
INI_Int("Weapon4",pInfo[playerid][pWeapon4]);
INI_Int("Ammo4",pInfo[playerid][pWeapon4a]);
INI_Int("Weapon5",pInfo[playerid][pWeapon5]);
INI_Int("Ammo5",pInfo[playerid][pWeapon5a]);
INI_Int("Weapon6",pInfo[playerid][pWeapon6]);
INI_Int("Ammo6",pInfo[playerid][pWeapon6a]);
INI_Int("Weapon7",pInfo[playerid][pWeapon7]);
INI_Int("Ammo7",pInfo[playerid][pWeapon7a]);
INI_Int("Weapon8",pInfo[playerid][pWeapon8]);
INI_Int("Ammo8",pInfo[playerid][pWeapon8a]);
INI_Int("Weapon9",pInfo[playerid][pWeapon9]);
INI_Int("Ammo9",pInfo[playerid][pWeapon9a]);
INI_Int("Weapon10",pInfo[playerid][pWeapon10]);
INI_Int("Ammo10",pInfo[playerid][pWeapon10a]);
INI_Int("Weapon11",pInfo[playerid][pWeapon11]);
INI_Int("Ammo11",pInfo[playerid][pWeapon11a]);
INI_Int("Weapon12",pInfo[playerid][pWeapon12]);
INI_Int("Ammo12",pInfo[playerid][pWeapon12a]);
printf("Finished loading player");
return 1;
}
Respuesta: Y_ini floats not loading -
adri1 - 04.11.2013
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
print("a");
Debug
EDIT: Fail
Where you use LoadUser_%s (INI_ParseFile)
Re: Y_ini floats not loading -
ikbenremco - 04.11.2013
Here:
Re: Y_ini floats not loading -
Konstantinos - 04.11.2013
The problem may be on the saving part and not here. Are the coordinates in the file saved correctly? If not, make sure that you actually get the position otherwise they'll be NULL.
@adri: since his message was printed in LoadUser_data - that means it's called.
Re: Y_ini floats not loading -
ikbenremco - 04.11.2013
This is in my .ini file:
PHP код:
PositionX = 1154.375244
PositionY = -1759.874877
PositionZ = 16.297098
After I logged back in for the
SECOND TIME after the server restart it loaded my coordinates somehow :O
Re: Y_ini floats not loading -
ikbenremco - 05.11.2013
nump
Re: Y_ini floats not loading -
ikbenremco - 05.11.2013
Bump.