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=596982)
warning 213: tag mismatch -
E7mad - 25.12.2015
Hello, can someone solve me this please?
PHP код:
stock GivePHealth(playerid, health)
{
new Float:currHealth, Float:nhealth;
GetPlayerHealth(playerid, currHealth);
nhealth = currHealth + health;
SetPHealth(playerid, nhealth); //line 224
}
stock SetPHealth(playerid, health)
{
SetPlayerHealth(playerid, health);
pInfo[playerid][Health] = health;
}
PHP код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(pInfo[damagedid][AOD] == 1)
{
GameTextForPlayer(playerid, "~g~DO NOT SHOOT AOD's", 3000, 3);
GivePHealth(playerid, amount); // line 222
}
return 1;
}
Код:
C:\Program Files\MyServer\pawno\include\required/stocks.inc(224) : warning 213: tag mismatch
C:\Program Files\MyServer\gamemodes\WGCNR.pwn(222) : warning 213: tag mismatch
Re: warning 213: tag mismatch -
Larceny - 25.12.2015
The variables tags are mismatched.
https://sampwiki.blast.hk/wiki/Scripting:tags
Код:
GivePHealth(playerid, Float:health)
SetPHealth(playerid, Float:health)
Make sure that pInfo[playerid][Health] is also a float.