Howdy, Stranger!

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

Cycling link issues

I have a stupid question, but I've been trying to work this out on my own for almost 2 days now and I've gotten no where. I'm working with a cycling link at the moment, but I cannot seem to get it to set a variable.

The code I have at the moment is as follows:
<<cyclinglink  set $variable "thing 1" "thing 2" "thing 3" "thing 4">>

If anyone could tell me what I'm doing incorrectly I would be most grateful.

Comments

  • FIRST! If you have not done so already, go to SugarCube 2's website and get the compatible version of the macro from there (under: Downloads > Add-ons).

    Once you have the SugarCube 2 compatible version, read the instructions that come with its package. That will tell you what you need to know. Alternatively, you may read SugarCube 2's macro documentation (right at the top, under: Passing a variable's name as an argument), which will tell you the same thing—still, get the correct version of the macro first.

    I'd really like to simply tell you the answer, however, I also want to ensure that you get the correct version of the macro.
  • Okay, I was not aware that there was an updated version of the cycle link macro, so thank you for that. Also, I hate to do this to you but, how do I incorporate the new code into Twine correctly?
  • edited September 2016
    The same way, I assume, you added the old one, by editing your project's Story JavaScript.
    1. Edit your project's Story JavaScript.
    2. Remove the old version of <<cyclinglink>>.
    3. Extract the package you downloaded. You should find a cyclinglink-macro.min.js file.
    4. Open the cyclinglink-macro.min.js file in a text editor (not a word processor) and copy its contents.
    5. Paste them into your project's Story JavaScript.
    Done.

    PS: Afterward, the syntax you want is:
    <<cyclinglink "$variable" "thing 1" "thing 2" "thing 3" "thing 4">>
    
    Reading the documentation I noted in my previous post should have told you that, but I might as well repeat it here.
  • It keeps telling me that there was an error when publishing the story... I've tried publishing it to file to view the full error message, but I get the same message.
  • Never mind, all fixed up! Thank you so much for helping this poor bumbling fool.
Sign In or Register to comment.