[Help] warning 213: tag mismatch
#1

I recently started to develop my saving system. I got a little cocky and decided to start saving skins. Unfortunately, it didn't work out like I wanted it to.

I got this error:
Code:
warning 213: tag mismatch
This is my saving code using DINI:
Code:
public OnPlayerDisconnect(playerid, reason)
{
    new file[128], pname[MAX_PLAYER_NAME];
    new Float:x, Float:y, Float:z;
    new Float:health;
    new Float:armour;
    new playerskin = GetPlayerSkin(playerid);

    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), "USERFILES/%s.ini", pname);

    if(dini_Exists(file))
    {
    GetPlayerPos(playerid, x, y, z);
    GetPlayerHealth(playerid, health);
    GetPlayerArmour(playerid, armour);
    dini_FloatSet(file, "CoordinateX", x);
    dini_FloatSet(file, "CoordinateY", y);
    dini_FloatSet(file, "CoordinateZ", z);
    dini_FloatSet(file, "Health", health);
    dini_FloatSet(file, "Armour", armour);
    dini_FloatSet(file, "Skin", playerskin);
    }
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new file[128], pname[MAX_PLAYER_NAME];
    new Float:x, Float:y, Float:z;
    new Float:health;
    new Float:armour;
    new playerskin = GetPlayerSkin(playerid);
        
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), "USERFILES/%s.ini", pname);

    if(!dini_Exists(file))
    {
    dini_Create(file);
    return 1;
    }

    else if(dini_Exists(file))
    {
    x = dini_Float(file, "CoordinateX");
    y = dini_Float(file, "CoordinateY");
    z = dini_Float(file, "CoordinateZ");
    health = dini_Float(file, "Health");
    armour = dini_Float(file, "Armour");
    playerskin = dini_Float(file, "Skin");
    SetPlayerPos(playerid, x, y, z);
    SetPlayerHealth(playerid, health);
    SetPlayerArmour(playerid, armour);
    SetPlayerSkin(playerid, playerskin);
    return 1;
    }
    return 1;
}
Sorry if the code is a little not indented. The forums messes it up. I just need to know how to fix this line:
Code:
    playerskin = dini_Float(file, "Skin");
If anyone could help me, that would be great!
Reply
#2

Replace This:
Code:
playerskin = dini_Float(file, "Skin");
To This:
Code:
dini_FloatSet(file, "Skin", playerskin);
Reply
#3

Quote:
Originally Posted by SAMProductions
View Post
Replace This:
Code:
playerskin = dini_Float(file, "Skin");
To This:
Code:
dini_FloatSet(file, "Skin", playerskin);
Ermagerd thank you.

REP +
Reply
#4

Quote:
Originally Posted by SAMProductions
View Post
Replace This:
Code:
playerskin = dini_Float(file, "Skin");
To This:
Code:
dini_FloatSet(file, "Skin", playerskin);
Why? He try to load it no save it again.

pawn Code:
playerskin = dini_Int(file, "Skin");
It is not float.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)