I've been working on a game with sound & music, and want to use this sound macro (http://www.glorioustrainwrecks.com/node/5061
). I'm using Sugarcane in Twine 1, and when I start the game, I get this error message:
Error [Music Code]: Cannot read property 'firstChild' of null.
"Music Code" is what I named the Script passage that holds the macro.
The code works just fine when I test it in the Sugarcane format instead of Sugarcube; I don't get the error message in Sugarcane. In Sugarcane I always get the error, and no sound plays.
I can't just switch to Sugarcane though; that Sugarcube format is essential to my story. Does anyone know how I can fix this? Or, if there is no solution, is there an alternate code I can use that anyone knows of?
(In the past, I used the Howler extension for sound, but I had trouble using any other code but playing sound for it [I had trouble looping & stopping music].)