Howdy, Stranger!

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

Need help with error message "Twine 2 macros use a different syntax to Twine 1 macros"

Hello I am a beginner to Twine and I'm trying to write a text-based adventure. I have used the commands <<set $value = >> and they aren't being executed, with a red message appearing on top, stating that "Twine 2 macros use a different syntax to Twine 1 macros".

Any help would be appreciated as I have no clue about how to fix it and I'm really interested in completing my project

Comments

  • edited May 2015
    You need to change the story format to SugarCube if you want to use that style of macro in Twine 2. Do this by clicking on your story name down the bottom left in the editing screen, and choose change story format from the popup menu.

    Alternatively you can download Twine 1.4.
  • You can find Twine 2's documentation here and infromation about how to check which story format you are using here.

    Because you have not stated which story format you are using I am going to assume you are using the default one which is Harlowe. The Harlowe documentation is here.
    I have used the commands <<set $value = >> and they aren't being executed
    If you look at the Harlowe documentation you will see that it's macro format looks like (macroname:), so your example of a set macro needs to be changed to the following:
    note: I suggest using the word to instead of an equals sign (=) when using the (set:) macro.
    (set: $value to "some value")
    

    I would also suggest to using either is or eq when using the (if:) macro:
    (if: $age is 20)[do something]
    
    (if: $age eq 20)[do something]
    
    The reason I suggested the above two things is because in javascript a single equals sign (=) is used for assignment and a double equals sign (==) is used for comparison, and getting these two things mixed up can cause issues in your story.
Sign In or Register to comment.