SA-MP Forums Archive
tag mismatch warning - 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: tag mismatch warning (/showthread.php?tid=496695)



tag mismatch warning - karolis11234 - 23.02.2014

i get this warning:warning 213: tag mismatch
how can i fix it?
the code is:
{
new float:health;
new veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(health > 900)
{
teise[playerid] = 1;
return 1;
}


Re: tag mismatch warning - Dignity - 23.02.2014

What line is the warning on?


Re: tag mismatch warning - karolis11234 - 23.02.2014

GetVehicleHealth(veh, health);
if(health > 900)


Re: tag mismatch warning - Dignity - 23.02.2014

Code below seems to compile just fine for me.

pawn Код:
// start of function
{
    new Float:health;
    new veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    if(health > 900)
    {
        teise[playerid] = 1;
        return 1;
    }
    return 1;
}



Re: tag mismatch warning - Arjanz - 23.02.2014

Hmm i dont find any error and works fine for me


Re: tag mismatch warning - Konstantinos - 23.02.2014

Quote:
Originally Posted by karolis11234
Посмотреть сообщение
new float:health;
It should be:
pawn Код:
new Float:health;
with capital F.


Re: tag mismatch warning - Beckett - 23.02.2014

PAWNO is case sensitive which means when you've wrote "float:health" it wont be marked as a "Float" which will return into a tag mismatch.