Error textdraw
#1

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?
Reply
#2

Shutting Up... I didn't read it properly.

Could you show us where you "create" the Textdraw1 variable?
Reply
#3

That piece of code is OnPlayerConnect,other code working fine,only that piece of code has problems.
Reply
#4

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.
Reply
#5

Thanks ^^
Reply
#6

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Thanks ^^
No prob's, glad i could help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)