GUI text problem, int to gui text.

Started by Synthetique, Sun 27/07/2003 15:32:33

Previous topic - Next topic

Synthetique

I want a gui to display the health.
I tried:
SetTextBoxText(3, 0, "Health: %d", health);

but it said "error: undefined symbol" when i tried to save..
what to do?

MachineElf

You'll have to do something like this:

StrFormat (buffer,"Health: %d",health);
SetLabelText (3,0,buffer);

SetLabelText only has those 3 parameters.
There are 10 kinds of people in the world: Those who understand binary and those who don't.

Pumaman

#2
SetTextBoxText doesn't support %d-style stuff. You need to do:

string temp;
StrFormat(temp, "Health: %d", health);
SetTextBoxText(3, 0, temp);


Edit: eek, pipped to the post by Vargtass :)

Synthetique


SMF spam blocked by CleanTalk