04.11.2013, 17:33
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:
debug :
code:
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
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;
}