Attach3DText problem.
#1

this code gives me that error.
That is error:

PHP код:
error 035: argument type mismatch (argument 2)1 Error. 
That is code:
PHP код:
 new Float:health;
     
GetPlayerHealth(playerid,Float:health);
    
format(health,sizeof(health),"%f",health);
    new 
Text3D:PlayerLabel2 = Create3DTextLabel(health, -1, 0.0, 0.0, 40.0, 20.0, 0, 1);
    
Attach3DTextLabelToPlayer(PlayerLabel2, playerid, 0.0, 0.0, 0.1); 
Reply
#2

PHP код:
new str[4], Float:health;
     
GetPlayerHealth(playerid,Float:health);
    
format(str,sizeof(str),"%f",health);
    new 
Text3D:PlayerLabel2 = Create3DTextLabel(str, -1, 0.0, 0.0, 40.0, 20.0, 0, 1);
    
Attach3DTextLabelToPlayer(PlayerLabel2, playerid, 0.0, 0.0, 0.1); 
Reply
#3

Quote:
Originally Posted by Lokii
Посмотреть сообщение
PHP код:
new str[4], Float:health;
     
GetPlayerHealth(playerid,Float:health);
    
format(str,sizeof(str),"%f",health);
    new 
Text3D:PlayerLabel2 = Create3DTextLabel(str, -1, 0.0, 0.0, 40.0, 20.0, 0, 1);
    
Attach3DTextLabelToPlayer(PlayerLabel2, playerid, 0.0, 0.0, 0.1); 
thanks a lot but, what did you change? can you explain me please?
Reply
#4

you format Float:health

yours:

PHP код:
format(health,sizeof(health),"%f",health); 
while you should have done like this something[cells]
mine

PHP код:
format(str,sizeof(str),"%f",health); 
Reply
#5

Quote:
Originally Posted by Lokii
Посмотреть сообщение
you format Float:health

yours:

PHP код:
format(health,sizeof(health),"%f",health); 
while you should have done like this something[cells]
mine

PHP код:
format(str,sizeof(str),"%f",health); 
I get it thanks a lot again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)