SA-MP Forums Archive
Problem with 3D Text Labels - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with 3D Text Labels (/showthread.php?tid=416034)



Problem with 3D Text Labels - ReDevilGames - 15.02.2013

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?


Re: Problem with 3D Text Labels - Misiur - 15.02.2013

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.