I've been trying to figure this one out for a while. I've been wanting to make my click to cast buttons support quotes without having to relog, but to no avail.
I'm not really sure where the code interpreter is screwing up though.
Think about this happening during runtime, not in code before the game is excuted, because that's not where the problems happen.
Method 1:
An input field is filled out and saved to a variable:
useability Lucan's Pact
So....
Abilities.cmd1 = useability Lucan's Pact
Now I want to take that command and stick it on a button so it can execute the command. So I make a physical button that when pressed pulls the correct code and puts it in another button and then presses that (so it can run the command). So inside
Button1:
Parent.Button2.onpress = Parent.Abilities.cmd1
Parent.Button2.press = true
Press the button in-game, nothing happens.....
Change it to an ability WITHOUT an apostrophe and it works fine.
Method 2:
Okay, lets change the original text to
Abilities.cmd1 = Lucan's Pact (so there's no more command in front of it)
And lets changed
Button1 to:
useability Parent.Abilities.cmd1
Okay, that works perectly... But why can't method 1 work?!
Where is it failing to execute properly?
It should be reading: Button2.onpress="useability Lucan's Pact" within the game, but it's apparently not
Does anyone have any ideas?