SA-MP Forums Archive
INVALID_TEXT_DRAW for PlayerTextDraw - 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: INVALID_TEXT_DRAW for PlayerTextDraw (/showthread.php?tid=465792)



INVALID_TEXT_DRAW for PlayerTextDraw - Grimrandomer - 24.09.2013

Well,

pawn Код:
new PlayerText:textDr[MAX_PLAYERS][5];

....
for (new p=0; p<5; p++) {
    tdSpeedo_bar[....][p] = INVALID_TEXT_DRAW;
}
gives me "warning 213: tag mismatch"

I couldn't find the INVALID_TEXT_DRAW equivalent for PlayerTextDraws, if anyone knows, greatly appreciated.

Grim.


Re: INVALID_TEXT_DRAW for PlayerTextDraw - iZN - 24.09.2013

EDIT: Sorry, couldn't get your question.

You've to add _: before the textdraw variable to prevent the tag mismatch

Example:
pawn Код:
if(_:TextdrawVar == INVALID_TEXT_DRAW) {
}
If that doesn't helps, than I'm sorry.


Re: INVALID_TEXT_DRAW for PlayerTextDraw - -Prodigy- - 24.09.2013

pawn Код:
tdSpeedo_bar[....][p] = _:INVALID_TEXT_DRAW;



Re: INVALID_TEXT_DRAW for PlayerTextDraw - Grimrandomer - 24.09.2013

Thanks for the tip for hiding the compiler errors, shame there is not an invalid id for player text draws

Edit:
Does not seem to hide the errors, still getting tag mismatch.


Re: INVALID_TEXT_DRAW for PlayerTextDraw - iZN - 24.09.2013

Try?
pawn Код:
#undef INVALID_TEXT_DRAW
#define INVALID_TEXT_DRAW  Text:0xFFFF
Also change that _: to Text:


Re: INVALID_TEXT_DRAW for PlayerTextDraw - Misiur - 24.09.2013

pawn Код:
tdSpeedo_bar[....][p] = PlayerText:INVALID_TEXT_DRAW;



Re: INVALID_TEXT_DRAW for PlayerTextDraw - Grimrandomer - 24.09.2013

Quote:
Originally Posted by Misiur
Посмотреть сообщение
pawn Код:
tdSpeedo_bar[....][p] = PlayerText:INVALID_TEXT_DRAW;
Worked a treat, thanks