Textdraw count - 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 count (
/showthread.php?tid=632714)
Textdraw count -
StrikerZ - 18.04.2017
Well I guess it isn't possible to count the textdraws created? It gives the no expression error + tag mismatch error.
PHP код:
stock TextDrawCreateEx(Float:x, Float:y, text[])
{
TextDrawCreate(Float:x, Float:y, text[]);
tdc++;
printf("[Current] Simple textdraw: %d",tdc);
return 1;
}
stock CreatePlayerTextDrawEx(playerid, Float:x, Float:y, text[])
{
CreatePlayerTextDraw(playerid, Float:x, Float:y, text[]);
ptd++;
printf("[Current] Player textdraw: %d",ptd);
return 1;
}
Re: Textdraw count -
DarkSkull - 18.04.2017
Have you initialized the variables before the functions?
If yes, Show the lines it shows the error and post the error too!
Re: Textdraw count -
StrikerZ - 18.04.2017
The errors come like many, just where the textdrawcreate and createplayertextdraw is used there is the error on those lines
Re: Textdraw count -
GangstaSunny. - 18.04.2017
U need to create the variables my friend...
Re: Textdraw count -
StrikerZ - 19.04.2017
Quote:
Originally Posted by GangstaSunny.
U need to create the variables my friend...
|
ptd, tdc are already defined my friend...
Re: Textdraw count -
Logic_ - 19.04.2017
Can you show me more of your code?
Are you using the function like this?
PHP код:
Text: TD = TextDrawCreateEx(Float:x, Float:y, text[]);
Re: Textdraw count -
StrikerZ - 19.04.2017
Quote:
Originally Posted by Logic_
Can you show me more of your code?
Are you using the function like this?
PHP код:
Text: TD = TextDrawCreateEx(Float:x, Float:y, text[]);
|
Yea, just like that for example
PHP код:
gServerTextdraws[0] = TextDrawCreate
Re: Textdraw count -
Logic_ - 19.04.2017
Try this:
TextDrawCreateEx(gServerTextdraw[0], 1.000, 1.000, "Test");
PHP код:
TextDrawCreateEx(&var, Float:x, Float:y, text[])
{
var = TextDrawCreate(x, y, text);
tdc ++;
}
Re: Textdraw count -
StrikerZ - 19.04.2017
There are shit loads of textdraws, now for that I'll have to change each and every td.
Re: Textdraw count -
Logic_ - 19.04.2017
try doing this for some textdraw and see if they compile or not.