Float is NaN - 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: Float is NaN (
/showthread.php?tid=636549)
Float is NaN -
czop1223 - 29.06.2017
Hello, I want to get the position above actor's head so I do this
new float:labelZ = ActorZ + 0.2000;
(ActorZ is 100 % correct because actor is spawned based on this variable)
when I do:
printf("Label: %f %f %f", ActorX, ActorY, labelZ);
the last value is NaN and the label is not displayed. Why could it be like that?
Re: Float is NaN -
Vince - 29.06.2017
It's supposed to be Float, not float. Despite the latter being highlighted. And as far as I know the position is the position of the feet. Meaning if you add 0.2 the label will appear somewhere at knee-height.
Re: Float is NaN -
aoky - 29.06.2017
PHP Code:
new Float:labelZ = ActorZ + 0.2000;
Do that.