Tag mismatch
#1

pawn Код:
public TextDrawShowHideForPlayer(playerid,Text:textdraw,time){
    SetTimerEx("HideTextdraw",time*1000,false,"dd",playerid,Text:textdraw); } /* HERE - TAG MISMATCH */
It shows me Tag Mismatch, but the script working good ... why ?
Reply
#2

pawn Код:
SetTimerEx("HideTextdraw",time*1000,false,"dd",playerid);
Reply
#3

no, lol ... because i have to hide the textdraw from my parameter, lol

playerid,Text:textdraw,time

Because HideTextdraw has 2 parameters: playerid,Text:textdraw
Reply
#4

Quote:
Originally Posted by MJ!
Посмотреть сообщение
no, lol ... because i have to hide the textdraw from my parameter, lol

playerid,Text:textdraw,time

Because HideTextdraw has 2 parameters: playerid,Text:textdraw
Remove the "Text:", i think its not needed.

pawn Код:
public TextDrawShowHideForPlayer(playerid,Text:textdraw,time){SetTimerEx("HideTextdraw",time*1000,false,"dd",playerid,textdraw); }
I guess its just needed when declaring the variable.
Reply
#5

yea, i tryed without it, same thing
Reply
#6

Quote:
Originally Posted by MJ!
Посмотреть сообщение
yea, i tryed without it, same thing
pawn Код:
public TextDrawShowHideForPlayer(playerid,Text:textdraw,time){SetTimerEx("HideTextdraw",time*1000,false,"ds",playerid,textdraw); }
Would this work?
If not, i would not know more that could help, yet.
Reply
#7

nop, didn't worked
Reply
#8

I think you cannot give Textdraws as Parameters for SetTimerEx. You could try to make a global variable for this, e.g. an array with one field for every player, so you can use this in the timer and do not have to give it as parameter,
Reply
#9

no... i don't think so ... if i need the textdraw ID , and i do this:

pawn Код:
new ID = textdraw;
It give the same warning, Tag Mismatch ...
Reply
#10

Yes, you would have to use a TextDraw array, so e.g. add this to your global variables:

new Text:draws[MAX_PLAYERS];

In TextDrawShowHideForPlayer save the textdraw in there:

draws[playerid] = textdraw;

Then you can use draws[playerid] in HideTextdraw. Only negative aspect would be, you can only have one Textdraw per player at the same time, or draws will be overwritten and the old one does not hide.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)