Hi!
In my game I'm trying to make it so when you press a button, it will print "Your relationship with Frances has improved!" and then add 1 to this value. Below is my javaScript:
What this should be doing is, when you click the "Flirt with Frances" button, it should print "Your relationship with Frances has improved!" and also add 1 to the s.FRANCES value. Instead, when I click the button, I get this error:
Am I doing something wrong or missing some code that is exclusive to Twine? Maybe someone fluent in JavaScript can help?
In my game I'm trying to make it so when you press a button, it will print "Your relationship with Frances has improved!" and then add 1 to this value. Below is my javaScript:
<% s.FRANCES = function(rstatusup) { print("Your relationship with Frances has improved!"); s.FRANCES = rstatusup + 1; } s.FRANCES(0); %> <button onclick="rstatusup">Flirt with Frances</button>
What this should be doing is, when you click the "Flirt with Frances" button, it should print "Your relationship with Frances has improved!" and also add 1 to the s.FRANCES value. Instead, when I click the button, I get this error:
⚠ Uncaught ReferenceError: rstatusup is not defined (file:///C:/Users/Alec/AppData/Local/Temp/nw5148_20689/index.html#stories/26d38271-fd3c-5baa-24b7-e9da21c5a0fc/test: 1)
Am I doing something wrong or missing some code that is exclusive to Twine? Maybe someone fluent in JavaScript can help?