Twine Version: 2.3.14
Story Format: 2.34.1
I’ve had a project for a long time, put it on ice for about half a year, and recently tried to start working on it, but I’ve gotten the weirdest issue.
Several of my functions, that worked flawlessly in the past, now all of a sudden show as undefined, even though they are in Story Script.
Apologies! An error has occurred. You may be able to continue, but some parts may not work properly.
Error [tw-user-script-0]: (intermediate value)(…) is not a function.
Error [StoryInit]: <>: error within widget contents (Error: <>: bad evaluation: objCopy is not defined).
I get this issue if I reference the functions as is, or prefixing “window.”
A console.log(window)
in the browser inspector didn’t show much. (FF 89.0.1 (64-bit))
Window file:///C:/Users/Nath/AppData/Local/Temp/48df6f22-6192-4f4e-a620-c693b0d59a9b.html
“$”: function S(e, t)
EvEmitter: function e()
FileSaver: Object { }
LZString: Object { _keyStr: “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=”, _f: fromCharCode(), compressToBase64: compressToBase64(e)
, … }
LockScreen: Object { lockWindow: lockWindow(htmltext)}
Scripts: Object { }
SugarCube: Object { Browser: {…}, Config: {…}, Dialog: {…}, … }
imagesLoaded: function o(e, t, r)
jQuery: function S(e, t)
returnExports: Window file:///C:/Users/Nath/AppData/Local/Temp/48df6f22-6192-4f4e-a620-c693b0d59a9b.html
saveAs: function g(b, g, h)
Symbol(Symbol.toStringTag): “Window”
: WindowPrototype { … }
Note that LockScreen
and Scripts
are successfully getting attached to window
Pastebin Story Script: https://pastebin.com/eEqpxYkF
I want to re-iterate: These functions (objCopy, rerenderInv so far) worked in the past. They have not been altered. Their scope has not been altered, and yet they are now erroring out.