So I seem to be having problems with scripts and sugarcube. I am a noob with twine so be gentle, but I am a technologist, so feel free to hit me upside the head when doing it.. I thought maybe it was the one script I am using, but I am now seeing it trying others, so I am obviously missing something easy.
I have done some forum and google searching to no avail...
I am using sugarcube r3402 and twine 1.4.1
If use a script (in my case playsound) and yes I changed the "StoreArea" to "store-area" already. I have defined my sound in the Storyinit already <<set $noise = "hit13.mp3">>
and call it in another passage using <<playsound $noise>> I get an error when running that says "Error: cannot execute macro <<playsound>>: undefined is not a function"
So then I tried another script and I get the same error.
So do I need to define these scripts as macros elsewhere that I am missing? I have the code stored in a passage tagged as a script...
Any guidance or materials to read is appreciated.
tks
biff
Comments
Found the problem. It seems that I got a little
this
happy in r3250 and changed some references I shouldn't have. The issue has been fixed in the repo and will be in the next release.That said, there's no reason to wait for the next release, since the part of the script that's failing is unnecessary in SugarCube anyway. As a completely safe workaround, you can do this:
FIND: (line 34 from the downloaded file) REPLACE WITH:
biff
After that they are all working like a charm...nice
biff