Label won't delete & update.
#1

I'm trying to update the label. That didn't work, so I also tried to remove it. Doesn't work neither.
Here is my code:

At the top of the script:
pawn Код:
new Text3D:stuff;
OnGameModeInit
pawn Код:
format(stufftype, sizeof(stufftype), "%s", PlayerInfo[playerid][PMessage]); // Stufftype is defined. Do not worry about that.
    stuff = Create3DTextLabel(stufftype, NEWBIE_COLOR, x, y, z, 20.0, 0); // X, Y and Z is defined. Do not worry about that.
OnPlayerCommandText
pawn Код:
Update3DTextLabelText(stuff, NEWBIE_COLOR, "New message!");
Reply
#2

I think instead of
pawn Код:
new 3DText:stuff;
it should be:

pawn Код:
new Text3D:stuff;
Reply
#3

Typo, I didn't copy and paste. I retyped it. It's Text3D, sorry.
Reply
#4

Why are you deleting the label, then attempting to update it? It's only common sense that you wouldn't delete something, then attempt an update - it's gone, nothing to update.
Reply
#5

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Why are you deleting the label, then attempting to update it? It's only common sense that you wouldn't delete something, then attempt an update - it's gone, nothing to update.
I even tried it without deleting the label, didn't work.
This was just a test by the way, you could simply ignore it.
Reply
#6

I see multiple other issues, but I am not going to waste my time on this.
Reply
#7

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Why are you deleting the label, then attempting to update it? It's only common sense that you wouldn't delete something, then attempt an update - it's gone, nothing to update.
Exactly what I was going to say.
Reply
#8

Okay then. Then I'm still looking for help.

--

@Victious
Read my reply, as I said, it was a test. It doesn't work. If I don't remove the label, it won't work. If I do remove the label, it won't work neither.
Reply
#9

I refuse to waste my time posting the correct way. Simply 'cause I'm on my phone ATM and I wanna goto bed.
Reply
#10

Then don't bother posting in this topic because you want to raise your post count.

I'm still looking for help if possible, I do not see any problem at all.

edit: My goodness, I should copy and paste next time. Fixed an other typo. There is NO problem with the 'OnGameModeInit' part for your information. That's was the only problem you both were talking about.

The problem is still not solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)