Skin Won't Load
#1

Hi Guys!,

So regarding my custom scripted server, I have encountered a INI error. The skin which is assigned to the player does not load properly.

It saves in the 'Users' folder in the scriptfiles. The code to actually load it up is fine also. I am quite lost as to why this is happening, So I thought maybe you guys could help :3

Код:
stock SaveCharacter(playerid)
{
    if(INI_Open(GetUser(playerid)))
    {
        INI_WriteInt("Skin",PlayerInfo[playerid][Skin]);
        INI_Save();
        INI_Close();
    }
   	return 1;
}
Код:
stock LoadCharacter(playerid)
{
    if(INI_Open(GetUser(playerid)))
    {
        PlayerInfo[playerid][Skin] = INI_ReadInt("Skin");
        INI_Save();
        INI_Close();
    }
    return 1;
}
The money saves and load, So does the Score too, It's puzzling me right now

- Thanks in advance.

EDIT: I do get a tag mismatch warning on line 1026 which is:

Код:
PlayerInfo[playerid][Skin] = INI_ReadInt("Skin");
Reply
#2

Show us when you put a value in PlayerInfo[playerid][Skin] variable.
Reply
#3

You should set players skin on spawn.

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)