SUGARCUBE 2.2.1
So in the below code- and yes I know I gotta be careful what I put, so we're using generic stuff to replace some of it... but, it seems to only work with half the code. The other two buttons do what is needed: they get clicked on, set variables, then poof away. But the other two don't work. Why so?
@@#masochist-kink;<<nobr>>
@@.button-black;<<button "I get off on pain.">>
<<set $masochist to 1>>
<<remove #masochist-kink>>
<</button>>
<</nobr>>@@;
@@
@@#certainkink;<<nobr>>
@@.button-black;<<button "this is really depraved and dark...">>
<<set $me to 1>>
<<remove #certainkink>>
<</button>>
<</nobr>>@@;
@@
@@#alcohol;<<nobr>>
@@.button-black;<<button "I'm addicted to alcohol.">>
<<set $alcoholic to 1>>
<<remove #alcohol>>
<</button>>
<</nobr>>@@;
@@
@@#hurt-kink;<<nobr>>
@@.button-red;<<button "I sometimes hurt myself. Badly.">>
<<set $selfharm to 1>>
<<remove #hurt-kink>>
<</button>>
<</nobr>>@@;
@@
so with one and three, they do their thing and they're gone. They all show up with the desired colors, which is good! More than I hoped for... but now I expect them all to do the same- show up with desired text color, allow a player to click, set a variable then disappear..... not uh, give me an error on second code that "replace could not work sicne there is no element named #certainkink" and on four just not work at all.