SA-MP Forums Archive
Label won't delete & update. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Label won't delete & update. (/showthread.php?tid=194901)



Label won't delete & update. - Biesmen - 30.11.2010

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!");



Re: Label won't delete & update. - lavamike - 30.11.2010

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

pawn Код:
new Text3D:stuff;



Re: Label won't delete & update. - Biesmen - 30.11.2010

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


Re: Label won't delete & update. - Scenario - 30.11.2010

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.


Re: Label won't delete & update. - Biesmen - 30.11.2010

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.


Re: Label won't delete & update. - Scenario - 30.11.2010

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


Re: Label won't delete & update. - WillyP - 30.11.2010

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.


Re: Label won't delete & update. - Biesmen - 30.11.2010

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.


Re: Label won't delete & update. - WillyP - 30.11.2010

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


Re: Label won't delete & update. - Biesmen - 30.11.2010

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.