textdraw warning ? tag warning?
#1

why i am getting 2 this warning?

PHP код:
C:\Users\Elvis JR\Desktop\CNR-rp\gamemodes\1.2.pwn(2489) : warning 213tag mismatch
C
:\Users\Elvis JR\Desktop\CNR-rp\gamemodes\1.2.pwn(2527) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Warnings

PHP код:
if(playertextid  == CDisagree[playerid]) 
PHP код:
if(playertextid  == CAccept[playerid]) 
PHP код:
    if(_:playertextid != INVALID_TEXT_DRAW// If the player clicked a valid textdraw, continue with the coding. (_:var removes the Text: tag, to avoid tag mismatch)
    
{
        if(
playertextid  == CAccept[playerid]) // this is the Line
        
{
            if(
gTeam[playerid] == Team_Cop// if hes\her is a cop !
            
{
                 
SendClientMessage(playeridCOLOR_RED"You are already Police Officer!");
                 
TextDrawHideForPlayer(playeridPoliceO[playerid]);
                
TextDrawHideForPlayer(playeridMainBoxC[playerid]);
                
TextDrawHideForPlayer(playeridAsACop[playerid]);
                
TextDrawHideForPlayer(playeridCanDoC[playerid]);
                
TextDrawHideForPlayer(playeridPCStar[playerid]);
                
TextDrawHideForPlayer(playeridCCMD[playerid]);
                
TextDrawHideForPlayer(playeridCRules[playerid]);
                
TextDrawHideForPlayer(playeridCAccept[playerid]);
                
TextDrawHideForPlayer(playeridCDisagree[playerid]);
                
CancelSelectTextDraw(playerid);
                return 
true;
            } 
// down = if not
            
gTeam[playerid] = Team_Cop;
            
SetPlayerSkin(playerid280);
            
SetCameraBehindPlayer(playerid);
            
//SetPlayerColor(playerid, COLOR_LIGHTBLUE);
              
RadioInfo[playerid][pCopRadio] = 1;
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"You Accepted Police Officer Job!");
            
SendClientMessage(playeridCOLOR_LIGHTBLUE"Do /commands for police Office Commands!");
            
TextDrawHideForPlayer(playeridPoliceO[playerid]);
            
TextDrawHideForPlayer(playeridMainBoxC[playerid]);
            
TextDrawHideForPlayer(playeridAsACop[playerid]);
            
TextDrawHideForPlayer(playeridCanDoC[playerid]);
            
TextDrawHideForPlayer(playeridPCStar[playerid]);
            
TextDrawHideForPlayer(playeridCCMD[playerid]);
            
TextDrawHideForPlayer(playeridCRules[playerid]);
            
TextDrawHideForPlayer(playeridCAccept[playerid]);
            
TextDrawHideForPlayer(playeridCDisagree[playerid]);
            
CancelSelectTextDraw(playerid);
        }
    }
    if(
_:playertextid != INVALID_TEXT_DRAW// If the player clicked a valid textdraw, continue with the coding. (_:var removes the Text: tag, to avoid tag mismatch)
    
{
        if(
playertextid  == CDisagree[playerid]) // and this one
        
{
            
SendClientMessage(playeridCOLOR_RED"You Disagree Police Officer Job!");
            
TextDrawShowForPlayer(playeridPoliceO[playerid]);
            
TextDrawHideForPlayer(playeridMainBoxC[playerid]);
            
TextDrawHideForPlayer(playeridAsACop[playerid]);
            
TextDrawHideForPlayer(playeridCanDoC[playerid]);
            
TextDrawHideForPlayer(playeridPCStar[playerid]);
            
TextDrawHideForPlayer(playeridCCMD[playerid]);
            
TextDrawHideForPlayer(playeridCRules[playerid]);
            
TextDrawHideForPlayer(playeridCAccept[playerid]);
            
TextDrawHideForPlayer(playeridCDisagree[playerid]);
            
CancelSelectTextDraw(playerid);
        }
    } 
Reply
#2

It seems that you are using per-player textdraws. So you should add [MAX_PLAYERS] to the textdraw variable.
Reply
#3

Quote:
Originally Posted by Wizzy951
Посмотреть сообщение
It seems that you are using per-player textdraws. So you should add [MAX_PLAYERS] to the textdraw variable.
i did that already
PHP код:
new Text:CAccept[MAX_PLAYERS];
new 
Text:CDisagree[MAX_PLAYERS]; 
Reply
#4

playertextid is for Playertext draws. Your using global. Should be: clickedid

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
Reply
#5

Quote:
Originally Posted by d3ll
Посмотреть сообщение
playertextid is for Playertext draws. Your using global. Should be: clickedid

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
thanks alot! +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)