ID:645778
 
(See the best response by Forum_account.)
Code:
Well I been trying to set a buttons text through code and I used this. This gives me a runtime error and I am stumped on how to fix it
        winset(src,"Quests.Button1","text=[quest1]")


Problem description:
Just gives a runtime error once the code is executed

You might need to change it to "text=[list2params(list(quest1))]". If there are symbols like spaces or commas in quest1 it might cause problems (not sure if it'd cause a runtime error though).

You can also use the Interface library, so all you'd have to do is:

client
var
Button/Button1

New()
..()
Button1 = new("Quests.Button1", src)

// any time you need to change the text, just call:
client.Button1.Text(quest1)

The button's Text proc handles the escaping of symbols and the call to winset.
heres the link to the project I been doing

Kinda only for practise. I wanted to create one of those nice questing systems. Anyways I still couldnt fix it with your help FA so I reset it back to normal. Posted the link up in case you wanna check it out and see is there anything wrong with more than that line of code thats causing the error
Best response
src is the mob you're clicking on, usr is the player doing the clicking. You need to change the "winset(src" lines to "winset(usr" and change the call to PaneShow to be usr.PaneShow().
ok thanks alot