3D Text Label update
#1

Hello

i want to make a 3D Text Label which updates itself when someone has harvested the field.

Код:
new Farmerlabel;
Код:
Update3DTextLabelText(Farmerlabel, 0xFFFFFFFF, "Drogenlager: %d.", FarmerDrugs);
Код:
Farmerlabel = Create3DTextLabel("Drogenlager: %d", FarmerDrogen, 0xFFFF00AA,-100.2003,-59.9764,3.1172,15,50,0);
But it don't work..

I hope someone can help me.

Best regards
Reply
#2

'it don't work' What isn't working? You are getting errors? Explain something more ...
Reply
#3

Use these instead:
Код:
new Farmerlabel, string[128];
Код:
format(string, sizeof(string), "Drogenlager: %d", FarmerDrugs);
Update3DTextLabelText(Farmerlabel, 0xFFFFFFFF, string);
Код:
format(string, sizeof(string), "Drogenlager: %d", FarmerDrogen);
Farmerlabel = Create3DTextLabel(string, 0xFFFF00AA,-100.2003,-59.9764,3.1172,15,50,0);
Reply
#4

Hi Keyle and thanks for your quick response!

I did what you say. Now i get warnings:

Код:
C:\Users\Administrator\Desktop\feuertest.pwn(8693) : warning 213: tag mismatch
C:\Users\Administrator\Desktop\feuertest.pwn(16543) : warning 213: tag mismatch

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Line 8693

Код:
format(farmstring, sizeof(farmstring), "Drogenlager: %d", FarmerDrogen);
Update3DTextLabelText(Farmerlabel, 0xFFFFFFFF, farmstring);
Line 16543

Код:
format(farmstring, sizeof(farmstring), "Drogenlager: %d", FarmerDrogen);
Farmerlabel = Create3DTextLabel(farmstring, 0xFFFF00AA,-100.2003,-59.9764,3.1172,15,50,0);
Best regards
Reply
#5

Are you sure that you defined the length of farmstring?
like new farmstring[128];
Reply
#6

yes i did
Reply
#7

The errors say it all. You should be looking at tags, not variable names...

pawn Код:
new FarmerLabel;
//Should be
new Text3D:FarmerLabel;
Enjoy
Reply
#8

oh thanks it works
Reply
#9

Quote:
Originally Posted by Kalli749
Посмотреть сообщение
oh thanks it works
Good

Glad I could help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)