Howdy, Stranger!

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

Works in Debug, doesn't work after published?

First off I should say that I am aware there's a space at the start of my location names; that was an accident I made early on and it was easier to standardize it for the story then go back and replace every instance of the location's name.

So in debug mode this code works properly:
before (link: "departing" )[(set: $Batteries to $Batteries+1)(goto: " Atrium")]
However, after playing the published story, I get this error: There's no passage named ' Atrium'.

There is absolutely a passage named " Atrium" (space included), I hold the fact that it works in debug mode as evidence of this. I know it's not the formatting of the code, because this works just fine:
(link: "outside" )[(set: $Garage to 0)(goto: " Garage")]
Can anyone tell me what it is that I'm missing?


  • Weird - I just tried creating some passages with that code and those names, and it seemed to work.

    Maybe upload the published story and I could have a look?
  • Also which browser (brand, version & 32/64bit) are you using to view your published story and which operation system (version & 32/64bit) are you running the browser on?
  • Here is the published story: Evil in the Museum.html

    Browser: Firefox 16.0.2, 32 Bit
    OS: Mac OS X 10.5.8, 64 Bit

    Any and all help is greatly appreciated!
  • You have a hard line break in one of the two " Atrium" markups (specifically, the one using the arrow separator).


    Should be this:
    [[here-> Atrium]]

    I don't know why it works in debug mode (that would be a question for Leon).  Personally, I'd have expected that (link markup containing a line break) to throw an error or simply fail to parse, rather than parse and try to link to " \nAtrium".
  • Ah I had missed that error, thank you very much! But, the linking code that isn't working uses the "goto" macro, not the arrow, and it doesn't have a line break in it, as far as I can tell
  • Sorry.  You failed to mention which passage your problem was in, so I reported the first I noticed.  If you're talking about the one in the " Supply Closet" passage, then it's the same problem as before.  You have a hard line break in the middle of the string literal you're passing to the (goto:) macro.

    You have:

    (goto: "
    When you should have:
    (goto: " Atrium")

    In fact, you seem to be using hard line breaks virtually everywhere.  As a suggestion, within paragraphs you should probably stick with soft line breaks (i.e. let it wrap at the window, don't use a hard line break).  You'll probably end up with fewer of these gotchas.
  • Is there a way that the hard line break could be coming in during the html conversion? Because it doesn't show up as being a break on my screen. I took a screencap to demonstrate:

    There's other places in the normal text that don't have linebreaks until the story is published. Do I have a display setting wrong or something?
  • The hard line breaks shouldn't be a result of the publishing your story, but something is obviously going on somewhere, so I suppose it can't be ruled out.

    As an example of what is going on, here's what the " Supply Closet" passage looks like in the published HTML file you posted:

    wasn't much in the supply closet beyond the usual. Cleansers, broom,
    dustpan, step ladder, ect. (if: not ((history:) contains " Supply
    Closet"))[I did grab some spare batteries for my flashlight before
    (link: "departing" )[(set: $Batteries to $Batteries+1)(goto: "
    Atrium")].] (if: (history:) contains " Supply Closet")[After surveying
    for anything useful I headed [[out| Atrium]].]
    If you open it in a decent text editor, not word processor, you should be able to see what I mean.  In fact, all your passages are, bizarrely, being hard wrapped at around 72 characters.  Actually, if you have a text editor and are able to see what I mean in the published HTML file, you could also try exporting your story (via Archive in the sidebar) and looking at the exported HTML archive to see if it the passages in it are also being hard wrapped at around 72 characters.

    I'm unsure if this is causative, however, you are running an old version of Firefox (v16.0.2).  It could be that old-Firefox + Twine 2 = hijinks.  If you tried my suggestion to export your story above and it did not contain the offending hard breaks, then you might try importing that archive into Twine 2 in a different, more up-to-date, browser as a test.  If everything looks good in your story in the other browser and when published it works as intended (I'd eyeball the published HTML too), then you'll have narrowed it down to your Firefox, at least.

    I just thought of something else.  Do you have any add-ons installed in Firefox which might be tinkering with <textarea> elements?
  • I viewed the archived html and also copied text from twine in TextEdit and Microsoft Word, in both cases the hardwrapping was not visible. I also don't have any add-ons installed except for AdBlocker, which I highly doubt is causing the problem? I'll try to borrow a friend's computer later today and import the archive into his browser, see if that'll do the trick (though that still won't explain why the problem is the browser). Thanks for helping me get to the bottom of this!
  • Are you using Internet Explorer to run the Twine 2 application? Are you editing the passage contents in something like Word and cut-n-pasting the contents into the passage editor?

    Both can automatically add / replace standard characters with others.
  • Ah, so that's the solution! I did cut/paste from a text editor first. Thanks for the heads up about that. Also, the breaks were visible when I sent the file to my friend's computer and viewed them there, so I was able to fix them! Thanks a ton for all your help guys!
Sign In or Register to comment.