[英]Tag mismatch player health
I'm trying to get the health of a player but I'm getting a tag mismatch error on the code below. 我正在尝试确保播放器的健康,但是下面的代码却出现了标签不匹配错误。
new health;
GetPlayerHealth(playerid, health);
Hopefully someone can help me, this is important to my server. 希望有人可以帮助我,这对我的服务器很重要。
This is a common problem in SA:MP (which I presume is what you're developing for). 这是SA:MP中的常见问题(我想这是您要开发的)。 GetPlayerHealth gives the player's health as a float, but you're saving it as an untagged variable. GetPlayerHealth将玩家的健康状况视为浮动,但您将其保存为未标记的变量。
To fix this, simply change new health;
要解决此问题,只需更改new health;
to new Float:health;
new Float:health;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.