Error Format - 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: Error Format (
/showthread.php?tid=366441)
Error Format -
pepy - 06.08.2012
Hi guys, can you help me please?
I have a problem, with this string
Код:
(124)new name[MAX_PLAYER_NAME+1];
(125)GetPlayerName(playerid, name,MAX_PLAYER_NAME);
(126)Create3DTextLabel("Cadavere di %s", name,0x008080FF, X, Y, Z, 40.0, 0, 0);
But when I compile my FS, compare an error:
(126) error 035: argument type mismatch (argument 2)
Probably is easy to risolve, but I didn't understand the solution
Re: Error Format -
you10 - 06.08.2012
You need to have a format() to add the name to the string.
pawn Код:
new name[MAX_PLAYER_NAME+1], string[40];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "Cadavere di %s", name);
Create3DTextLabel(string,0x008080FF, X, Y, Z, 40.0, 0, 0);
Re: Error Format -
pepy - 06.08.2012
Quote:
Originally Posted by you10
You need to have a format() to add the name to the string.
pawn Код:
new name[MAX_PLAYER_NAME+1], string[40]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(string, sizeof(string), "Cadavere di %s", name); Create3DTextLabel(string,0x008080FF, X, Y, Z, 40.0, 0, 0);
|
Oh man, thank you!
Rep +1!
Re: Error Format -
Devilxz97 - 06.08.2012
Quote:
Originally Posted by pepy
Oh man, thank you!
Rep +1!
|
you cant give Rep to other people , if u dont have 50+ post