warning 213: tag mismatch
#1

I dont know why this is a tag mismatch
Код:
(1385) : warning 213: tag mismatch
pawn Код:
forward EXPUpdate();
public EXPUpdate()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new score[128];
            format(score, sizeof(score), "%d",pInfo[i][Exp]);
            TextDrawSetString(EXPTextdraw2[i], score);
        }
    }
    return 1;
}
Line 1385
pawn Код:
TextDrawSetString(EXPTextdraw2[i], score);
Reply
#2

Sorry to bump so early, Its just really urgent, and I know one of u guys know how to do it! Ill rep bcuz i bumped so early
Reply
#3

Quote:
Originally Posted by Mriss
Посмотреть сообщение
Sorry to bump so early, Its just really urgent, and I know one of u guys know how to do it! Ill rep bcuz i bumped so early
How is this any more important that anyone else's question?

Show me
pawn Код:
EXPTextdraw2[i]
Also why are you defining it for max_players?
Reply
#4

TextDrawSetString edits an already existing textdraw, you must specify the one to edit. e.g

pawn Код:
TextDrawSetString(EXPTextdraw2[2], score);
Also creates a global one, try this

pawn Код:
TextDrawShowForPlayer(playerid, himessage);
Reply
#5

It's because the array must be declared with the correct tag. With your code would be:
pawn Код:
new Text: EXPTextdraw2[MAX_PLAYERS];
but I recommend you to use per-player textdraws.
Reply
#6

So COuld someone re-do my stock? please.
Reply
#7

pawn Код:
new PlayerText:EXPTextdraw2[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};

public OnPlayerConnect(playerid)
{
    EXPTextdraw2[playerid] = CreatePlayerTextDraw(playerid, bla, bla bla , "-");
    return 1;
}

//Showing the textdraw
PlayerTextDrawShow(playerid, EXPTextdraw2[playerid]);


forward EXPUpdate();
public EXPUpdate()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new score[128];
            format(score, sizeof(score), "%d", pInfo[i][Exp]);

            PlayerTextDrawSetString(i, EXPTextdraw2[i], score);
        }
    }
    return 1;
}
Reply
#8

your include is bugged uploading new include



Rep me if i help you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)