warning 202: number of arguments does not match definition - 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: warning 202: number of arguments does not match definition (
/showthread.php?tid=583366)
warning 202: number of arguments does not match definition -
jamesmith12 - 27.07.2015
hmm something wrong right ?
Код:
new pclass[123];
format(pclass, sizeof(pclass), "Class:%d",GetClass(playerid));
//Class TextDraw
TextClass[playerid] = CreatePlayerTextDraw(playerid, 486.875000, 154.000015, "Class : %d" ,pclass);
Error Line
Код:
TextClass[playerid] = CreatePlayerTextDraw(playerid, 486.875000, 154.000015, "Class : %d" ,pclass);
EDIT : FIXED ! THANKS TO : JuanStone
Re: warning 202: number of arguments does not match definition -
SpikeSpigel - 27.07.2015
You need to have 4 positions, not 2.
Respuesta: warning 202: number of arguments does not match definition -
JuanStone - 27.07.2015
You can't do format a text with the function "TextDrawCreate".
First create the text and then format beams.
PHP код:
TextClass[playerid] = CreatePlayerTextDraw(playerid, 486.875000, 154.000015, "");
After:
new string[45]; // change size.
format(string, sizeof(string), "Class : %d" ,pclass);
PlayerTextDrawSetString(playerid, TextClass[playerid], string); // format textdraw.
Re: warning 202: number of arguments does not match definition -
jamesmith12 - 27.07.2015
Quote:
Originally Posted by JuanStone
You can't do format a text with the function "TextDrawCreate".
First create the text and then format beams.
PHP код:
TextClass[playerid] = CreatePlayerTextDraw(playerid, 486.875000, 154.000015, "");
After:
new string[45]; // change size.
format(string, sizeof(string), "Class : %d" ,pclass);
PlayerTextDrawSetString(playerid, TextClass[playerid], string); // format textdraw.
|
Ah thank you ! haha +1 rep to you two
AW: warning 202: number of arguments does not match definition -
Mencent - 28.07.2015
Hello!
You can also write it like this:
PHP код:
TextClass[playerid] = CreatePlayerTextDraw(playerid, 486.875000, 154.000015,pclass);