Howdy, Stranger!

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

Tin Cans setTheme macro issue

edited January 2014 in Help! with 1.x
Hi guys!

Trying Tin Cans here ...

When I use the story format without the setTheme macro set, it works perfectly, but when I try to set the setTheme macro, I get an error after build (or test) the story.

[IMG]http://i.imgur.com/Rs2taYc.png[/img]

[IMG]http://i.imgur.com/0vV8mNL.png[/img]

I'm calling it with:
<<setTheme "e">>
I can't see where's the error ...  :P

Maybe something to do with the new version? Or with the Mac version of Twine (I have that error with accented characters)?

Comments

  • This is a total shot in the dark, what I ask may solve your problem or be totally useless and wrong. Such is the risk of consulting a javascript novice. :P

    Is setTheme() defined? From my limited javascript experience, I've never heard of it. I don't think its default library?
  • Thanks for the answer CoraBlue ... but yes, setTheme is defined in different passages.

    Any other clue?  ;) I don't know how to contact the author of the story format ...  :P
  • Are you sure your "setTheme" java-script function actually works?

    Have you tried calling it directly by creating and access a passage containing something like:

    <script>
    setTheme('e');
    </script>
  • Hey there Bughead!
    I'm the author of the TinCans theme. I saw a decent amount of traffic was coming from here and thought I'd investigate.

    That error isn't a normal javascript error, but looks like something with the mac javascript interpreter, which is super weird.

    From the only other account of that error I could find, it seems like you MIGHT have copied an invisible character into the text box that contains the macro code. If you copied the code from the site directly into that window it's certainly possible. Could I get you to try opening a TextEdit window in "Plain Text" mode (in the format menu), paste the code into THAT, and then copy FROM that into the twine editor.

    If anyone needs a nice code+text editor for mac (that's also free), I'd really recommend http://www.sublimetext.com/. It's super-good, and helps solve a lot of issues for me with coding. It also color-codes javascript in a way that makes learning it easier if you're not really familiar with it.
  • I'm having the same problem, but on a PC running Chrome. I've tried copying the Macro into a plain text editor but that hasn't helped. I hope you can find a solution Gritfish, I'm really excited about Tin Cans!
Sign In or Register to comment.