Help me please!
#1

I've made a textdraw and everything is fine !
But...
This code:
Код:
PlayerTextDrawSetString(playerid, XPS, newxp);
Shows this warning:
Код:
warning 213: tag mismatch
What is the problem ??
Thanks !!
Ironmen
EDIT:
TextDraw create:
Код:
XPS = TextDrawCreate(310, 432, "Xp: ");
Update:
Код:
new newxp[246];
    format(newxp, sizeof(newxp), "Xp: %d", XP[playerid]);
    PlayerTextDrawSetString(playerid, XPS, newxp);
Reply
#2

show the textdraw creating code and updating the textdraw code too
Reply
#3

Show XPS and newxp
Reply
#4

PHP код:
new Text:XPS[246]; 
^ Replace with the other XPS variable.
Reply
#5

Quote:
Originally Posted by karemmahmed22
Посмотреть сообщение
PHP код:
new Text:XPS[246]; 
^ Replace with the other XPS variable.
After I did this it added more Tag MisMatches !
Reply
#6

First of all learn how to create textdraw for players with CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw



EDIT:
try this
1st Step:
pawn Код:
new PlayerText:XPS[MAX_PLAYERS]; //At top of script
2nd Step:
pawn Код:
public OnPlayerConnect(playerid)
{
    XPS[playerid] = CreatePlayerTextDraw(playerid, 310, 432, " ");
    PlayerTextDrawShow(playerid, XPS[playerid]);
    return 1;
}
Update Step:
pawn Код:
new newxp[246];
format(newxp, sizeof(newxp), "Xp: %d", XP[playerid]);
PlayerTextDrawSetString(playerid, XPS[playerid], newxp);
Reply
#7

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
First of all learn how to create textdraw for players with CreatePlayerTextDraw
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw



EDIT:
try this
1st Step:
pawn Код:
new PlayerText:XPS[MAX_PLAYERS]; //At top of script
2nd Step:
pawn Код:
public OnPlayerConnect(playerid)
{
    XPS[playerid] = CreatePlayerTextDraw(playerid, 310, 432, " ");
    PlayerTextDrawShow(playerid, XPS[playerid]);
    return 1;
}
Update Step:
pawn Код:
new newxp[246];
format(newxp, sizeof(newxp), "Xp: %d", XP[playerid]);
PlayerTextDrawSetString(playerid, XPS[playerid], newxp);
BUT..
now it's not showing for players!!!!!!!!!!!!!

IronMen
Reply
#8

then use PlayerTextDrawShow(playerid, XPS[playerid]); at OnPlayerSpawn
Reply
#9

my best guess is that XPS is not a "PlayerText" so first define it as PlayerText:XPS
(and you probably should add a [MAX_PLAYERS] to it so every XPS is unique for players)
and whenever you use it, add PlayerText: before it, your tag mismatches will be fixed I guess.
Reply
#10

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
my best guess is that XPS is not a "PlayerText" so first define it as PlayerText:XPS
(and you probably should add a [MAX_PLAYERS] to it so every XPS is unique for players)
and whenever you use it, add PlayerText: before it, your tag mismatches will be fixed I guess.
Nothing worked!!!
Help me!
Thanks!
IronMen!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)