Howdy, Stranger!

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

problem on revert macro

Hi,

i can't understand why revert macro doesn't work. I'm using Sugarcane on Twine 1.4.2 (Windows 8.1), I've installed replace macro set (http://l.j-factor.com/twine/macros/ReplaceMacros.min.js) and css related, and now i'm trying to manage the examples below, found (copy and paste) on wiki or tutorials.

But Twine displays both choices, instead of just the one in "revise" command. So, let's say, it gives me the choice to close a closed box.

Where do I go wrong?

Thanks for helping me!

<<revision box>>Here is a closed box.<<becomes>>Here is an open box.<<endrevision>>
<<revert box "Close the box.">>
<<revise box "Open the box.">>

You see
<<revision gender>>
<<set $gender = "male" ; $him = "him" ; $he = "he" ; $his = "his">>
<<becomes>><<set $gender = "female" ; $him = "her" ; $he = "she" ; $his = "her">>
<<endrevision>>
<<revise gender "a guy">>
<<revert gender "a girl">>looking back at you.

Comments

  • I'm sure it's a stupid question, but may anyone explain to me exactly why?...  :o

    I cannot find answer on this forum, old google group, wiki, porpentine's site, L's blog, auntiepixelante.com or other resorces about Twine

    Thank you again.  :)
  • There is a bug in the code that first displays the revert link, it does not add a display: none; to the style of the link so the link incorrectly gets displayed, where as the code that gets called when you click on the revert link does add a display: none; to the links style.

    I suggest you either use the version found here that contain only the revision & revise macros and that works, or if you really need the combined version that includes everything that you sent a PM or email to Leon asking him to fix and update the code on his post.
  • Great! Thank you.
  • Thanks for reminded me about this bug and others, everyone. I've done a new update which is documented here.
  • Well done, Leon. Thank you.
Sign In or Register to comment.