SA-MP Forums Archive
Selectable textdraws - 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)
+--- Thread: Selectable textdraws (/showthread.php?tid=456189)



Selectable textdraws - DeMoX - 04.08.2013

Hi all,
i'm receiving 2 warnings because of selectable textdraws

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
  if(_:playertextid != INVALID_TEXT_DRAW)//13271
  {
    for(new x=6; x<15; x++)
    {
	   if(playertextid == TickTD[playerid][x])
	   {
            if(TickTurn[playerid]==0) SendClientMessageEx(playerid,-1,"Its not your turn");
            else if(ticbox[playerid][x-6] != 0) SendClientMessageEx(playerid,-1,"You cant draw in this box");
            else tickbox(playerid,x-6);
			break;
	   }
    }
  }
  return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
  if(_:clickedid == INVALID_TEXT_DRAW) //13253
  {
    if(GetPVarInt(playerid,"InTic")) TogglePlayerControllable(playerid,0),SelectTextDraw(playerid,0xFFFFFFFF);
  }
  return 1;
}
Код:
NFoP\gamemodes\NFOP.pwn(13253) : warning 213: tag mismatch
NFoP\gamemodes\NFOP.pwn(13271) : warning 213: tag mismatch



Re: Selectable textdraws - Ziyan - 04.08.2013

Which lines are 13253 and 13271?


Re: Selectable textdraws - DeMoX - 04.08.2013

lol read the code, i already showed lines

Код:
if(_:clickedid == INVALID_TEXT_DRAW) //13253
if(_:playertextid != INVALID_TEXT_DRAW)//13271



Re: Selectable textdraws - SuperViper - 04.08.2013

I'm almost certain that you're supposed to put the _: before INVALID_TEXT_DRAW and not the variables in this case.

If that doesn't work, use the actual tags instead of _.