SA-MP Forums Archive
What ID does the first textdraw return? - 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: What ID does the first textdraw return? (/showthread.php?tid=358467)



What ID does the first textdraw return? - Tee - 10.07.2012

I was trying to find out where textdraw IDs start at but there's a small problem, I get a warning when trying to compile this:

pawn Код:
new Text:textdraw = TextDrawCreate(1.0,45.0,"testing");
printf("Textdraw ID: %d",textdraw);
The warning is at the print line saying "warning 213: tag mismatch".


Re: What ID does the first textdraw return? - Vince - 10.07.2012

I am not sure. The warning can be circumvented by prefixing the variable with an empty tag like so:
pawn Код:
printf("Textdraw ID: %d", _:textdraw);



Re: What ID does the first textdraw return? - Tee - 10.07.2012

Thanks, it worked


Re: What ID does the first textdraw return? - coole210 - 10.07.2012

Yes, you get a warning. But, that doesn't mean it doesn't work.

My results:

pawn Код:
[13:21:26] Textdraw ID: 0
[13:21:26] Textdraw2 ID: 1