Page 1 of 1

Question for people familiar with inform 7

PostPosted: Wed, 13Aug28 17:54
by lamont Sanford
Hey all got a question for everyone. I am currently playtesting my game and have come across a bug, the problem is that I cannot really pinpoint if the bug lies in inform 7 or in the interpreter I am using to play the game (gargoyle). Here is what happens , if you are playing a saved game you get an error stating "Glulxe fatal error: reference to nonexistent Glk object" and the game crashes. This only happens with a saved game and as best I can tell it has something to do with sound files. Unless I figure out how to fix it I may have to scrap the ability to save your game which is not what I want to happen. Anyway if anyone has dealt with this issue before or has any suggestions then fire away.

Re: Question for people familiar with inform 7

PostPosted: Wed, 13Aug28 21:51
by Wolfschadowe
I don't know the tool, but it sounds similar to a error I get periodically. Usually when I get it, it's because of a simple typo. One that got me for nearly a week of trying to track down was where I had a period in the code where there should have been a comma (. vs ,) Easy to miss even when looking for problems. Just as a sanity check, have you scrubbed your Save/Restore code?

Wolfschadowe

Re: Question for people familiar with inform 7

PostPosted: Wed, 13Aug28 22:35
by lamont Sanford
I was able to isolate what is causing the problem but not really how to fix it. Right now I have it so you cannot save the game during day 1 which is clunky BUT it stops the trigger from being...well, triggered, it is an extension which is giving me grief, the extension allows you to play multiple sounds at once, there is a foreground and background channel, and you can make a midground channel with a when play begins: create midground channel command. The midground channel is the culprit. when you save a game and restore the saved game the mnidground channel vanishes somehow and when there is a call to play a sound on the midground channel which no longer exists it crashes. I thought about doing away with the midground channel but there are times when all 3 are needed at once. On day 2 the midground channel is never needed so if you block saving until day 2 the error has no way of being triggered. The game is pretty fast and on day 1 saving is not really a must have option. Day 2 has a scene where death is a probable outcome if you do not escape a situation quick enough so saving before that is more important and is still intact. Anyway bottom line is until/if this can be fixed it is gonna stay this way.

Re: Question for people familiar with inform 7

PostPosted: Wed, 13Aug28 23:19
by ExLibris
You'd probably be best off posting Inform 7 coding questions to either aifarchive or intfiction.org (or possibly to the author of the extension).

My second piece of advice would be to test the game with another interpreter.

Re: Question for people familiar with inform 7

PostPosted: Thu, 13Aug29 00:39
by lamont Sanford
Yeah I posted the question across 4 boards including the ones you mentioned. I tested it with windows glulxe as well, same deal. def nailed down the problems source but as of now I do not know how to fix it or if it is fixable...so I have adopted the band aid solution for now. The game is pretty much ready for other eyes to test at this point, gonna see if I can fix this first.

Re: Question for people familiar with inform 7

PostPosted: Sat, 13Aug31 12:43
by karrek
I don't know anything about inform 7 specifically, but from general coding knowledge would it be possible to have a check to see if the midground channel exists each time you need to use it, and if it doesn't exist then create it just before calling it? That's clunky, but it should fix the issue if it's possible. Something like:

if no midground channel
-create midground channel
play midground sound