y_ini Reading
#9

I got a problem. When I now read the file out I get a totaly wrong skinid. In the file the skinid is 93, but when I connect it sets my skin to 53. I never used this number before...I can't even find a 53 in my script (in coordinates of course). Here is the code:

pawn Code:
forward LoadUserData(playerid, name[ ], value[ ]);
pawn Code:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, PlayerInfo[playerid][userskin]);
    return 1;
}
pawn Code:
OnPlayerConnect(...)
{
if(fexist(PlayerInfo[playerid][userfile]))
{
INI_ParseFile(PlayerInfo[playerid][userfile], "LoadUserData", false, true, playerid);
}
}
pawn Code:
public LoadUserData(playerid, name[ ], value[ ])
{
    if (!strcmp(name, "Skin"))
    {
        format(PlayerInfo[playerid][userskin], 3, "%i", value);
        SetPlayerSkin(playerid, PlayerInfo[playerid][userskin]);
    }
}
The .ini File:

pawn Code:
Skin = 93
Reply


Messages In This Thread
y_ini Reading - by GiS - 08.01.2011, 18:54
Re: y_ini Reading - by Mаkaveli - 08.01.2011, 19:09
Re: y_ini Reading - by GiS - 08.01.2011, 19:31
Re: y_ini Reading - by Mаkaveli - 08.01.2011, 20:07
Re: y_ini Reading - by GiS - 08.01.2011, 20:15
Re: y_ini Reading - by Mаkaveli - 08.01.2011, 20:27
Re: y_ini Reading - by GiS - 09.01.2011, 08:46
Re: y_ini Reading - by Mаkaveli - 09.01.2011, 09:52
Re: y_ini Reading - by GiS - 09.01.2011, 10:56
Re: y_ini Reading - by [03]Garsino - 09.01.2011, 11:03

Forum Jump:


Users browsing this thread: 1 Guest(s)