Problem with 3D Text Labels
#1

PHP код:
1enum LabelArrays {
2)     House1,
3) };
4) new Text3D:LabelTexts[LabelArrays];
5
6LabelTexts[House1] = CreateDynamic3DTextLabel(DynamicString,0xFFFFFFFF,-2795.6719,-181.0081,7.6950,50.0); 
On LINE 6, the compiler gives me this warning: tag mismatch
But, if I not use enumeration, like that:
PHP код:
1) new Text3D:LabelTexts[1];
2LabelTexts[0] = CreateDynamic3DTextLabel(DynamicString,0xFFFFFFFF,-2795.6719,-181.0081,7.6950,50.0); 
The compiler gives me no warning.
WHY?
Reply
#2

I don't have enough knowledge about diffrences between arrays and enumerators to explain to you why it is happening.

pawn Код:
enum LabelArrays {
    Text3D:House1
};
new LabelTexts[LabelArrays];
LabelTexts[House1] = CreateDynamic3DTextLabel(DynamicString,0xFFFFFFFF,-2795.6719,-181.0081,7.6950,50.0);
Text3D is a strong tag, and the variable storing it must be same type. My guess is that by using an enumerator you cannot force the type for whole array as you did with generic one.

Use pawn tag in future.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)