CreateDynamic3DTextLabel
#1

I get this

Код:
../gamemodes/OnGameMode.pwn(799) : warning 213: tag mismatch
PHP код:
GarageInfo[g][gTextLabelID]=CreateDynamic3DTextLabel("{FFFFFF}[{339900}Garage{FFFFFF}]",0x00AE00FF,GarageInfo[g][gEnterX], GarageInfo[g][gEnterY], GarageInfo[g][gEnterZ]+0.7525.0INVALID_PLAYER_IDINVALID_VEHICLE_ID1GarageInfo[g][gEWorld], GarageInfo[g][gEInt], -1100.0); 
Reply
#2

Did you tag gTextLabelID as Text3D?

PHP код:
enum something {
    
Text3D:gTextLabelID

Reply
#3

Quote:
Originally Posted by zPain
Посмотреть сообщение
Did you tag gTextLabelID as Text3D?

PHP код:
enum something {
    
Text3D:gTextLabelID

I forgot to put text3d on the enum lol.
Reply
#4

Maybe u can help here too

Код:
../gamemodes/OnGameMode.pwn(255) : warning 213: tag mismatch
PHP код:
GarageInfo[idx][gTextLabelID] = strval(arrCoords[18]); 
Reply
#5

PHP код:
GarageInfo[idx][gTextLabelID] = Text3D:strval(arrCoords[18]); 
This will remove the warning.

I'm starting to wonder if you're doing this right. I've never seen someone fetch a value in a file and then assign it to a 3dtext variable before.
Reply
#6

Quote:
Originally Posted by zPain
Посмотреть сообщение
PHP код:
GarageInfo[idx][gTextLabelID] = Text3D:strval(arrCoords[18]); 
This will remove the warning.

I'm starting to wonder if you're doing this right. I've never seen someone fetch a value in a file and then assign it to a 3dtext variable before.
Really, thx for the help!
Reply
#7

I'm not sure why you want to convert a integer value to that same variable used to store a reference to a 3DText label.

Storing a 3DText label's reference is done so you can delete it later on, or change the text of the 3DText label.

Overwriting that reference with another value will cause bugs, because it may reference a non-existing 3DText label, or even worse, another existing one.
So in the end, you'll be deleting/updating the wrong 3DText label, totally messing up your entire server.

It's the same as your house-number.
Your house is identified by the number on a plate next to your door.
So if you tell someone at which house-number you live, they'll always find you.
If you change that number by something else, nobody can find you.

If you change the numbers in the entire street and suddenly another house gets your number, everyone you invite will go to the wrong house.

Storing references in a file is simply not done.
You should save the coordinates of the 3DText label and the text that should appear on it and other settings for each 3DText label.
When you read that file, you need to re-create the 3DText label and store the reference that is returned by CreateDynamic3DTextLabel.

Same applies to saving vehicle-id's. That's not done either.
You simply save all data about a vehicle, not the id because it may change when you add/remove vehicles from your files.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)