ID:156800
 
Currently I have this code to change a certain buttons text but for some reason it only changes the text to the first word being "Current" or "Attribute".

        Stamina()
set hidden = 1
if(src.StatPoints>1)
var/I="Current Stamina: [src.MS]; Click to increase stamina"
var/I2="Attribute Points: [src.StatPoints]"
src.MS+=5
src.StatPoints--
winset(src, "Stats.Stamina", "text=[I]")
winset(src, "Stats.StatPoints", "text=[I2]")
else
src<<"You are out of attribute points."
return
Put quotes around the value of your parameter. In this case, you'll have to put \" like so:
<dm>winset(src,"Stats.Stamina","text=\"[I]\"")
In response to Kaiochao (#1)
Kaiochao wrote:
Put quotes around the value of your parameter. In this case, you'll have to put \" like so:
<dm>winset(src,"Stats.Stamina","text=\"[I]\"")

Ah, I see. Thanks :D.