warning 213: tag mismatch
#1

I know what it means but I can't see it, it's in my save interior and virtual world I just made, could someone take a look?

The save...
pawn Код:
Float:i, Float:v;


        i = GetPlayerInterior(playerid);
    v = GetPlayerVirtualWorld(playerid);

       
    dini_FloatSet(file, "Interior", i);
    dini_FloatSet(file, "VirtualWorld", v);
The load...

pawn Код:
Float:i, Float:v;

                 i = dini_Float(file, "Interior" );
        v = dini_Float(file, "VirtualWorld" );
         
                SetPlayerInterior(playerid, i); //warning 213: tag mismatch
        SetPlayerVirtualWorld(playerid, v);//warning 213: tag mismatch
Obviously that isn't the whole save system but that is what is giving me those warnings.
Reply
#2

Interior and virtual world are both integers not floats, remove the tag or cast it like this:

pawn Код:
Float:i, Float:v;


        _:i = GetPlayerInterior(playerid);
    _:v = GetPlayerVirtualWorld(playerid);
EDIT:

Same with the part that gives you warnings, I DO NOT SUGGEST THIS but it is a work-around!

pawn Код:
SetPlayerInterior(playerid, _:i); //warning 213: tag mismatch
SetPlayerVirtualWorld(playerid, _:v);//warning 213: tag mismatch
The latter is NOT suggested!

The best option for you is to just change it all back to regular integer variables

Regards.
Reply
#3

Interior and Virtual worlds are not floats
they are integers
hence - > - > - >
pawn Код:
new i, v;

                 i = dini_Int(file, "Interior" );
        v = dini_Int(file, "VirtualWorld" );
         
                SetPlayerInterior(playerid, i); //fix
        SetPlayerVirtualWorld(playerid, v);//fix
Reply
#4

Yeah thanks, I just went and tested it anyway and saw the problem when it saves as 1.00000000. Thanks for the response.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)