HI,
I have set up a global variable of 10 and created a GUI button and am trying to make the text show '10' from that global variable.
PlayerHP = 10
I have tried @PlayerHP@ and %PlayerHP but they just show the text but not the variable value.
Any help would be appreciated. thankyou.
Labelname.Text = String.Format("%d", PlayerHP);
Thanks, that worked great, i apologiose for the new thread for this since it did seem very elementary.
...dear watson? :P
No need to apologize. It is indeed very basic, but I asked the exact same question 2-3 years ago ;)
One small point to add: if you haven't already, do look up Format in the AGS manual, as %d will work only for integer variables. If you want to display strings, floating-point numbers, etc, you need a different symbol (or symbols) following the per cent sign.
thanks i will check up on that, thanks for the advice