It looks like you're new here. If you want to get involved, click one of these buttons!
<% 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>
⚠ 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)
Comments
There are three main reasons the button element's onclick event is not working:
1. It is incorrectly referencing a variable instead of a function.
2. The variable it is referencing is a parameter of a function.
3. Your can't externally reference a function parameter.