Textdraws Conflicting
#1

What can cause textdraws to appear malformed or out of place for nearly every textdraw when it was fine a couple of weeks ago? What could cause this?

I added some new textdraws but I don't get why they would interfere with old ones? Could it be too many textdraws?
Reply
#2

Same ID or placeholder problem.
Reply
#3

No code - no help, other than that, it's just guessing.
Reply
#4

Quote:
Originally Posted by T0pAz
View Post
Same ID or placeholder problem.
Explain this in more detail.

Quote:
Originally Posted by Unte99
View Post
No code - no help, other than that, it's just guessing.
What code am I supposed to post? My 100k Gamemode? Its a general problem which I can't seem to narrow down thus why I'm asking for help/ideas to narrow it down.
Reply
#5

Quote:
Originally Posted by MisterTickle
View Post
Explain this in more detail.



What code am I supposed to post? My 100k Gamemode? Its a general problem which I can't seem to narrow down thus why I'm asking for help/ideas to narrow it down.
So if you have to paste just a ~500 lines code, instead you paste the whole gamemode ? Very smart...
Reply
#6

I think he just wants general reasons this can occur.
Reply
#7

If You're creating / destroying TD's in OnPlayerConnect/Disconnect I suggest you re-make the TD's to be created in OnGameModeInit, and destroy in OnExit, show in OnConnect, hide in OnDisconnect. Avoids 99% of all TD problems as many scripters make player TD's in OnPlayerconnect because they're not comfortable with using loops in Ongamemodeinit or whatever reasons they have..

next make sure to create the variable correctly,
"wrong" (not really wrong but may cause problems):
pawn Code:
new Text:HelloWorld[MAX_PLAYERS];
//after destroying
TextDrawDestroy(HelloWorld[playerid]);
good:
pawn Code:
new Text:HelloWorld[MAX_PLAYERS] = {_:INVALID_TEXTDRAW_ID,...};
//after destroying:
TextDrawDestroy(HelloWorld[playerid]);
HelloWorld[playerid] = _:INVALID_TEXTDRAW_ID;
And there are other ways to avoid TD problems, make sure you don't go over 2048 while creating, if you have 4 TD's, when you loop 800 players, all players have their own TD, you're out of luck cuz u making 3200 TD's.

also using ~r~ ~g~ etc etc thing in TD strings larger than 127 chars makes the TD's go weird too.

and last but not least: Make sure nothing is messing with your server memory and variables (plugin?)

@ALL people above me, you don't always need the source, if you think so - re-read this post,
if you have re-read it and still think you need the source, re-read my post again.
Re-Read until you get it.
Then go on

I prefer this kind of help instead of analyzing someone's 100k line GM.
Reply
#8

You've always helped me out Gamer_Z.. I appreciate it. I will try your advice and some of my own thoughts and see how it goes.

new Text:HelloWorld[MAX_PLAYERS] = {_:INVALID_TEXTDRAW_ID,...};

That type of line always give me a tag mismatch.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)