I am using Harlowe 1.2.4 and Twine 2.1.3 and I'm getting an error on several mobile devices, the error (alert) is: "missing ) after argument list", while on other devices "Unexpected token =>". I believe that the issue is from the code below, the error didn't came up when I excluded this passage, however everything seems fine to me. Any solution or suggestion?
{ <div class="container home-menu">
<div class="row content-1">
<div class="col-xs-12 text-center">
<!-- Menu -->
<img style="height:90px;" src="res/images/splash_logo.png"/><br>
(unless: (saved-games:) contains $_autosave_slot and (datavalues: (saved-
games:)) contains $_autosave_filename)[(goto: $_start_passage)]
}''<span class="home-button">[[New->$_start_passage]]</span><br>
<span class="home-button">(link: "Continue")[(load-game: $_autosave_slot)]
</span>''<br><a href="#" onClick="closeMeNow();" class="home-
button">Exit</a>
<!-- Credits -->
<div class="bottom-links"><a href="contact.html"><span style="color:
white;">some text</span></a><br>
<a href="credits.html"><span style="color: white;">some text</span></a></div>
</div>
</div>
</div>
<script> function closeMeNow() { navigator.app.exitApp();} </script>
Comments
To illustrate the issues the following was modified to include the HTML elements representing the Collapsing white-space & Bolding markup, and more indentation to highlight the potential HTML structure being generated. The following is a break down of the issues in your example:
1. You have invalid line-breaks in the middle of a macro name, a CSS class name, and a CSS property / value pair.
2. You are ending the Collapsing white-space (<tw-collapsed>) element before ending the div elements contained within it. The web-browser may try to auto-correct this issue by moving the </tw-collapsed> to after the last </div> for you.
3. You are conditionally redirecting the reader to another passage after you start constructing your div elements instead of doing it before that.
The following is a corrected version of your example. NOTE: I have included extra indentation and line-breaks in the above so that you can see the differences, you may wish to remove them.