Float is NaN
#1

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?
Reply
#2

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.
Reply
#3

PHP Code:
new Float:labelZ ActorZ 0.2000
Do that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)