Error textdraw - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error textdraw (
/showthread.php?tid=259698)
Error textdraw -
Face9000 - 05.06.2011
I've created a textdraw to show kills:
pawn Код:
new tds[128];
format(tds, sizeof(tds), "Kills: %d",GetPlayerScore(playerid));
Textdraw1[playerid] = TextDrawCreate(8.000000, 426.000000, tds);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
But i get this errors:
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
What's wrong?
Re: Error textdraw -
Ash. - 05.06.2011
Shutting Up... I didn't read it properly.
Could you show us where you "create" the Textdraw1 variable?
Re: Error textdraw -
Face9000 - 05.06.2011
That piece of code is OnPlayerConnect,other code working fine,only that piece of code has problems.
Re: Error textdraw -
Stigg - 05.06.2011
Try:
pawn Код:
new tds[128];
format(tds, sizeof(tds), "Kills: %d",GetPlayerScore(playerid));
Textdraw1[playerid] = TextDrawCreate(8.000000, 426.000000, tds);
TextDrawBackgroundColor(Textdraw1[playerid], 255);
TextDrawFont(Textdraw1[playerid], 1);
TextDrawLetterSize(Textdraw1[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw1[playerid], -1);
TextDrawSetOutline(Textdraw1[playerid], 0);
TextDrawSetProportional(Textdraw1[playerid], 1);
TextDrawSetShadow(Textdraw1[playerid], 1);
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
You missed [playerid] on some lines.
Re: Error textdraw -
Face9000 - 05.06.2011
Thanks ^^
Re: Error textdraw -
Stigg - 05.06.2011
Quote:
Originally Posted by Logitech90
Thanks ^^
|
No prob's, glad i could help.