Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Removing "this story's code has got itself in a mess"

I have a twine story embedded in a web page. There is a javascript error elsewhere on the page (that I am unable to fix) that is causing Chrome and Internet Explorer (but not Firefox, interestingly) to pop up the error message "Sorry to interrupt, but this story's code has got itself in a mess..."

The script that is causing the error is not part of the embedded twine code, but the pop-up error message seems to be. Is there a way to turn off that error message so it doesn't display at all? It is not needed and is only confusing to readers.

Thanks!

Comments

  • May I ask what the error actually is, out of curiousity? If you're adding a script to the HTML file that is seemingly buggy, I'd be interested in what exactly it is. I wonder if I could figure out a fix.

    If you really need to suppress that message, you could try putting
    window.onerror=null;
    in a <script> element prior to the included script.
  • The error is "Sorry to interrupt, but this story's code has got itself in a mess. (Uncaught TypeError: undefined is not a function). You may be able to continue playing, but parts of the story may not work properly."

    I haven't added any script to the story, and when I debug the page in Chrome, it shows the error as being part of the main structure of the website, not the embedded twine story. It looks like that error is present on every page of the site, but only when I embed a Twine story on a page does the error message pop up on page load. So what I'm assuming is that the error itself has nothing to do with Twine, but Twine happens to pop up a message if there are any errors anywhere on the page.

    I'll try your suggestion for suppressing the message and see how that goes!
  • Perhaps I'm implementing this the wrong way, but if I create a passage with the tag "script" and in it I put:

    window.onerror=null;

    the error message still pops up. Is there a different place I should put that script? (I'm fairly Javascript ignorant...)
  • Hello, I am new in twine.
    I try to do something special with twine : running  a complete web site like a story - with transition effect for the pictures... the work in progress is available here  http://www.aehoga.net/aehoga_2014.html (and there are again a lot to do.)

    On this story I use a contact form (php + javascript) linked by a iframe.
    I test it on browser (safari 5.1, safari 7.x, firefox 31, chromium 36, Sea Monkey 2.26, Safari for ipad). On only one browser (safari 5.1) i get the message " Sorry to interrupt, but this story's code has got itself in a mess (Script error.). You may be able to continue playing, but parts of the story may not work properly. "
    And this occurs only when i want to quit the story for another web site (not a url linked, but any new url).  I get no error on the others browsers ! - I use a web inspector but i don't see any script error while the visit of my story.

    If someone could give me some advice, i appreciate.
Sign In or Register to comment.