harlowe-audio icon indicating copy to clipboard operation
harlowe-audio copied to clipboard

Make empty tracks errors more informative. [Original: TypeError When I Open The Game]

Open kc063 opened this issue 2 years ago • 4 comments

Having issues using the system altogether. Used an older version of it a long time ago, but for whatever reason, the new version keeps throwing me this error when I copypaste the code and try to run the game:

There is a problem with this story's 1st script: TypeError: Cannot read properties of undefined (reading 'split') TypeError: Cannot read properties of undefined

kc063 avatar Jul 27 '22 16:07 kc063

Looked through old errors. I don't have ad blockers running, so I don't think it should be an extension issue. Furthermore, when I redownload my old game and try rebuilding it (with the old version of the code it was running then), I get these errors: "1 too many values were given to the (masteraudio:) macro. 2 too many values were given to the (track:) macro." Makes sense. Probably outdated with the new Twine version.

So I decided to paste in the NEW HAL tracks code into my OLD game, and the most updated version of the code works fine for that one-- the audio tracks work perfectly. It seems like it doesn't work for my current game SPECIFICALLY, which is wigging me out.

kc063 avatar Jul 27 '22 16:07 kc063

Also, to add some detail, when I run the game I get the issues "I can't run the macro 'track' because it doesn't exist.I can't run the macro 'group' because it doesn't exist.I can't run the macro 'track' because it doesn't exist.I can't run the macro 'track' because it doesn't exist." So it might just not be reading the script at all? This is so bizarre to me.

kc063 avatar Jul 27 '22 16:07 kc063

Fixed this myself-- you can't have blank tracks or it does this. Hopefully this will be helpful to the next person to get this error! Make sure your tracks aren't blank! If anyone gets this without blank tracks, let me know, but it's working for me... for now.

kc063 avatar Jul 27 '22 20:07 kc063

I'm gonna reopen this.

I should make the error message more useful when users try to pass empty tracks.

ChapelR avatar Jul 28 '22 01:07 ChapelR