warning 213: tag mismatch - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning 213: tag mismatch (
/showthread.php?tid=349318)
warning 213: tag mismatch -
cloudysky - 08.06.2012
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.
AW: warning 213: tag mismatch -
Extremo - 08.06.2012
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.
Re: warning 213: tag mismatch -
Niko_boy - 08.06.2012
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
Re: warning 213: tag mismatch -
cloudysky - 08.06.2012
Yeah thanks, I just went and tested it anyway and saw the problem when it saves as 1.00000000. Thanks for the response.