SA-MP Forums Archive
Textdraw related warnings? - 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: Textdraw related warnings? (/showthread.php?tid=401749)



Textdraw related warnings? - jessejanssen - 23.12.2012

Hello community,

I got these two ( I guess quite simple. ) warnings which of I can't figure out how to fix them!

Warnings:
Код:
F:\GTA\server\samp03e_svr_win32\gamemodes\gamemode.pwn(40) : warning 213: tag mismatch
F:\GTA\server\samp03e_svr_win32\gamemodes\gamemode.pwn(232) : warning 213: tag mismatch
Lines:
pawn Код:
Line 40: TextDrawShowForPlayer(p, Hinfo[h][HTextDraw]);
Line 232: Hinfo[id][HTextDraw] = TextDrawCreate(0.0, 240.0, string);
If someone knows what's causing this you'd help me alot!

Best regards,
Jesse


Re: Textdraw related warnings? - [HiC]TheKiller - 23.12.2012

If you're using textdraws per player then use https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw and https://sampwiki.blast.hk/wiki/PlayerTextDrawShow. If it's just single player textdraws then make sure the
pawn Код:
Hinfo[h][HTextDraw]
is defined in the enum as a text by using the Text: identifier.


Re: Textdraw related warnings? - jessejanssen - 23.12.2012

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
If you're using textdraws per player then use https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw and https://sampwiki.blast.hk/wiki/PlayerTextDrawShow. If it's just single player textdraws then make sure the
pawn Код:
Hinfo[h][HTextDraw]
is defined in the enum as a text by using the Text: identifier.
I want to show the textdraws just to players within a certain area ( With IsPlayerInRangeOfPoint. ) and I figured it should be possible with TextDrawShowForPlayer as you have to put in a playerid and textdraw. The textdraw is created on server startup and using the functions you told me would make the script creating a textdraw for every player once they enter that certain area and delete it after they leave the area, seems a little memory wasting for me but if I can't find any solution for this I guess I'll have to go with your way.

Best regards,
Jesse

EDIT:
Nevermind, I did text:HTextDraw instead of Text:HTextDraw. Typing mistake! Problem solved!