TextDrawDestroy (a workaround/upgrade?)
#25

What I've seen some people do is improperly initialize arrays of TextDraw IDs, such as this:
pawn Код:
new
    Text:g_SomeTextDraw[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW}
;
The proper way to do it is this:
pawn Код:
new
    Text:g_SomeTextDraw[MAX_PLAYERS] = {Text:INVALID_TEXT_DRAW, ...} // <- dots
;
If you leave the dots out, only the first element will be INVALID_TEXT_DRAW; the rest will be 0.

Edit: Oops, didn't see page 2.


Quote:
Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
I believe it's something like this

pawn Код:
new Array[ARRAY_SIZE][ARRAY_SIZE]= { {number, ...}, ...};
The only way to initialize multi-dimensional arrays is by looping, preferably in On(GameMode/FilterScript)Init.

Edit 3: Like this.
Reply


Messages In This Thread
TextDrawDestroy (a workaround/upgrade?) - by Tee - 10.07.2012, 18:21
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 18:55
Re: TextDrawDestroy (a workaround/upgrade?) - by Tee - 10.07.2012, 19:05
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 19:06
Re: TextDrawDestroy (a workaround/upgrade?) - by Tee - 10.07.2012, 19:07
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 19:17
Re: TextDrawDestroy (a workaround/upgrade?) - by Tee - 10.07.2012, 19:21
Re: TextDrawDestroy (a workaround/upgrade?) - by Jay_ - 10.07.2012, 19:36
Re: TextDrawDestroy (a workaround/upgrade?) - by Y_Less - 10.07.2012, 19:52
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 20:03
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 10.07.2012, 20:25
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 20:47
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 10.07.2012, 20:49
Re: TextDrawDestroy (a workaround/upgrade?) - by Y_Less - 10.07.2012, 20:50
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 21:22
Re: TextDrawDestroy (a workaround/upgrade?) - by Y_Less - 10.07.2012, 21:39
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 10.07.2012, 21:53
Re: TextDrawDestroy (a workaround/upgrade?) - by Jay_ - 10.07.2012, 22:36
Re: TextDrawDestroy (a workaround/upgrade?) - by Tee - 10.07.2012, 22:57
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 10.07.2012, 23:10
Re: TextDrawDestroy (a workaround/upgrade?) - by Kar - 11.07.2012, 00:47
Re: TextDrawDestroy (a workaround/upgrade?) - by Roko_foko - 11.07.2012, 07:01
Re: TextDrawDestroy (a workaround/upgrade?) - by Joe Staff - 11.07.2012, 07:37
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 11.07.2012, 07:39
Re: TextDrawDestroy (a workaround/upgrade?) - by Slice - 11.07.2012, 08:36
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 11.07.2012, 09:10
Re: TextDrawDestroy (a workaround/upgrade?) - by Y_Less - 11.07.2012, 11:16
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 11.07.2012, 12:18
Re: TextDrawDestroy (a workaround/upgrade?) - by MP2 - 12.07.2012, 12:50
Re: TextDrawDestroy (a workaround/upgrade?) - by Y_Less - 12.07.2012, 13:10
Re: TextDrawDestroy (a workaround/upgrade?) - by Slice - 12.07.2012, 13:16
Re: TextDrawDestroy (a workaround/upgrade?) - by Y_Less - 12.07.2012, 13:19
Re: TextDrawDestroy (a workaround/upgrade?) - by Patrik356b - 22.07.2012, 14:13
Re: TextDrawDestroy (a workaround/upgrade?) - by [HLF]Southclaw - 22.07.2012, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)