Attach3DText problem.
#1

this code gives me that error.
That is error:

PHP код:
error 035argument 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, -10.00.040.020.001);
    
Attach3DTextLabelToPlayer(PlayerLabel2playerid0.00.00.1); 
Reply
#2

PHP код:
new str[4], Float:health;
     
GetPlayerHealth(playerid,Float:health);
    
format(str,sizeof(str),"%f",health);
    new 
Text3D:PlayerLabel2 Create3DTextLabel(str, -10.00.040.020.001);
    
Attach3DTextLabelToPlayer(PlayerLabel2playerid0.00.00.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, -10.00.040.020.001);
    
Attach3DTextLabelToPlayer(PlayerLabel2playerid0.00.00.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)