SA-MP Forums Archive
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:xFloat:ytext[])
{
    
TextDrawCreate(Float:xFloat:ytext[]);
    
tdc++;
    
printf("[Current] Simple textdraw: %d",tdc);
    return 
1;
}
stock CreatePlayerTextDrawEx(playeridFloat:xFloat:ytext[])
{
    
CreatePlayerTextDraw(playeridFloat:xFloat:ytext[]);
    
ptd++;
    
printf("[Current] Player textdraw: %d",ptd);
    return 
1;




Re: Textdraw count - DarkSkull - 18.04.2017

Have you initialized the variables before the functions?
PHP код:
new tdcptd
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 код:
TextTD TextDrawCreateEx(Float:xFloat:ytext[]); 



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 код:
TextTD TextDrawCreateEx(Float:xFloat:ytext[]); 
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:xFloat:ytext[])
{
    var = 
TextDrawCreate(xytext);
    
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.