Error: array sizes
#1

PHP код:
error 047: array sizes do not match, or destination array is too small 
Line:
PHP код:
ResetArray(PT_Text[text]); 
Define:
PHP код:
#define ResetArray(%0); new ArrayReset[MAX_TEXT_DRAWS]; %0 = ArrayReset; 
Reply
#2

PT_Text's size is not MAX_TEXT_DRAWS

Also, that's a horrible macro.
Reply
#3

Quote:
Originally Posted by Crayder
Посмотреть сообщение
PT_Text's size is not MAX_TEXT_DRAWS

Also, that's a horrible macro.
PHP код:
new PT_Text[Text:MAX_TEXT_DRAWS][800 char]; 
I know that's horrible. Can you show me better macro?
Reply
#4

Код:
new PT_Text[Text:MAX_TEXT_DRAWS][800 char];
new PT_DefaultText[Text:MAX_TEXT_DRAWS][800 char];

//And to clear it:
#define ResetTextDrawText(%0) %0 = PT_DefaultText
Even with that though, it is only proper to use PT_Text in there. It's still not a good macro. It's just an example of how to correctly do it your way.
Reply
#5

Yeah, it's only for PT_Text.

This "system" is for moving TextDraw from current position to another position. Specifically, changing TextDrawTextSize because I don't see another way.
Thanks Crayder.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)