SA-MP Forums Archive
Attach3DText problem. - 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: Attach3DText problem. (/showthread.php?tid=652573)



Attach3DText problem. - lolya93 - 14.04.2018

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



Re: Attach3DText problem. - Lokii - 14.04.2018

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



Re: Attach3DText problem. - lolya93 - 14.04.2018

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?


Re: Attach3DText problem. - Lokii - 14.04.2018

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



Re: Attach3DText problem. - lolya93 - 14.04.2018

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.