SA-MP Forums Archive
(82465) : error 017: undefined symbol "PI" - 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: (82465) : error 017: undefined symbol "PI" (/showthread.php?tid=633282)



(82465) : error 017: undefined symbol "PI" - HostedPlayerss - 28.04.2017

(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 © 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);



Re: (82465) : error 017: undefined symbol "PI" - Dayrion - 28.04.2017

Variable PI isn't declared.


Respuesta: (82465) : error 017: undefined symbol "PI" - HostedPlayerss - 28.04.2017

It's like declaring the PI variable


Re: (82465) : error 017: undefined symbol "PI" - DRIFT_HUNTER - 28.04.2017

You probably just need to define it as constant.
pawn Код:
#define PI 3.14



Re: (82465) : error 017: undefined symbol "PI" - Toroi - 28.04.2017

PHP код:
PI[playerid][pHunger
Shoulnd't it be PlayerInfo instead?

You'll face errors in the next line aswell;
PHP код:
NamePlayer(playerid),playerid