Create3DTextLabel Function Doesn't Support [Arrays]?
#1

PROBLEM SLOVED!
Still am looking what caused the warnings, I will leave a note here once I find it out.

Title says it all, or am I doing something wrong here?

pawn Code:
//on top of script
121.    new Text3D:TextLabel[2][9];


//under OnGameModeInit();
268.    TextLabel[1][1] = Create3DTextLabel("Activated", 0x008080FF, 3646.271, -1412.883, 305.455, 15.0,0);


//under a Command Text
466.    Update3DTextLabelText(TextLabel[1][1], 0xFFFFFFFF, "Disabled");
These are the warnings I get while compiling.
Code:
C:\...\gamemodes\GameMode.pwn(268) : warning 213: tag mismatch
C:\...\gamemodes\GameMode.pwn(466) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

FIRST EDIT:
Once I delete both the array, the compiler doesn't show any warnings/errors.
So my guess is that there is something wrong with the arrays?
Code:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#2

pawn Code:
TextLabel[1][1] = Create3DTextLabel("Activated", 0x008080FF, 3646.271, -1412.883, 305.455+0.75, 15.0,0);
Try this.
Reply
#3

Quote:
Originally Posted by Darnell
View Post
pawn Code:
TextLabel[1][1] = Create3DTextLabel("Activated", 0x008080FF, 3646.271, -1412.883, 305.455+0.75, 15.0,0);
Try this.
Still the same warnings.
Not to sound silly, but what is the point of increasing the height of the object by 0.75 anyways?
Reply
#4

I don't seem to be getting these errors. Your colours are actually non-existent, they are meant to be 6 characters after the 0x, not 8, not sure if that would give you tag mismatches though.
Reply
#5

For those who are attempting to help me, please read the FIRST EDIT, on the Main Post.


PROBLEM SLOVED!
Reply
#6

Oh damn, didn't catch that the problem is fixed. The green just blended in with your signature!

Quote:
Originally Posted by [HiC]TheKiller
View Post
I don't seem to be getting these errors. Your colours are actually non-existent, they are meant to be 6 characters after the 0x, not 8, not sure if that would give you tag mismatches though.
0x008080FF is a perfectly valid color. The FF is for the alpha (opacity)!

I just tried creating similar code and it compiles perfectly without warnings.

Actually I have no idea how tags are beneficial, someone help me out if necessary, but you could also mess around with the tags like this:
pawn Code:
new TextLabel[2][9];
// ...
TextLabel[1][1] = _:Create3DTextLabel("Activated", 0x008080FF, 3646.271, -1412.883, 305.455, 15.0,0);
// ...
Update3DTextLabelText(Text3D:TextLabel[1][1], 0xFFFFFFFF, "Disabled");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)