PDA

View Full Version : (82465) : error 017: undefined symbol "PI"


HostedPlayerss
28/04/2017, 02:41 PM
(82465) : error 017: undefined symbol "PI"
(82465) : warning 215: expression has no effect
(82465) : error 001: expected token: ";", but found "]"
(82465) : error 029: invalid expression, assumed zero
82465) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.




format(inv_str,sizeof(inv_str),"Health:_%.0f%%~n~_~n~Armor:_%.0f%%~n~_~n~Satiety:_ %.0f%%",health, armour, PI[playerid][pHunger]), PlayerTextDrawSetString(playerid,inv_OtherPTD[playerid][3],inv_str);
format(inv_str,sizeof(inv_str),"~w~%s_(~y~%d~w~)",NamePlayer(playerid),playerid), PlayerTextDrawSetString(playerid,inv_OtherPTD[playerid][4],inv_str);

Dayrion
28/04/2017, 02:52 PM
Variable PI isn't declared. :confused:

HostedPlayerss
28/04/2017, 03:00 PM
It's like declaring the PI variable

DRIFT_HUNTER
28/04/2017, 05:35 PM
You probably just need to define it as constant.
#define PI 3.14

Toroi
28/04/2017, 09:38 PM
PI[playerid][pHunger]

Shoulnd't it be PlayerInfo instead?

You'll face errors in the next line aswell;
NamePlayer(playerid),playerid)