return error on side health?
#1

return error? any one can help me to fix that?
. thanks before

Код:
stock GetPlayerDarah(playerid) 
{
	return PlayerInfo[playerid][pHealth];// line 2110
}
stock SetPlayerDarah(playerid, Float:amount)
{
	PlayerInfo[playerid][pHealth] = amount;
	return SetPlayerHealth(playerid, amount);
}
get error
Код:
Process started >>>
anehaneh.pwn(2110) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
<<< Process finished. (Exit code 0)
================ READY ================
Reply
#2

Make sure you have it like this in your enum.
pawn Код:
enum p_info
{
    Float:pHealth//<< this
};
new PlayerInfo[MAX_PLAYERS][p_info]
Reply
#3

Код:
stock Float:GetPlayerDarah(playerid) 
{
	return PlayerInfo[playerid][pHealth];// line 2110
}
You must add the "Float" tag if the function returns a float.
Reply
#4

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Make sure you have it like this in your enum.
pawn Код:
enum p_info
{
    Float:pHealth//<< this
};
new PlayerInfo[MAX_PLAYERS][p_info]
Already added on top script

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
Код:
stock Float:GetPlayerDarah(playerid) 
{
	return PlayerInfo[playerid][pHealth];// line 2110
}
You must add the "Float" tag if the function returns a float.
get error
Код:
gamebaru.pwn(2108) : warning 208: function with tag result used before definition, forcing reparse
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#5

Quote:
Originally Posted by kloning1
Посмотреть сообщение
Already added on top script



get error
Код:
gamebaru.pwn(2108) : warning 208: function with tag result used before definition, forcing reparse
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
It took me a few seconds to ******. Read what Vince said: https://sampforum.blast.hk/showthread.php?tid=359341
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)