Howdy, Stranger!

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

set/print macro does not exist

I have read the previously forum posts and other google links.
And tried a couple of things to no avail.
So, here's my problem.

I am a newbie, and trying to make a game
i have 1.4.2 Twine, and Sugarcube 2.18.0 on a windows 10 computer and up-to-date chrome browser.

I have StoryInit page that states :

<<nobr>>
<<set //initalising

state.active.variables.Arrows = 0
state.active.variables.Food = 0
state.active.variables.Money = 0

>>
<<endnobr>>

and also StoryMenu page with

You have <<Print $Arrows>> Arrows
Food = <<Print $Food>>
You are currently carrying $<<Print $Money>>

<<back>>

and in other parts of the story,
I use commands like
<<set $Arrows -= 1>>

and when i go to test play, on my chrome browser, it states "Error: macro <<Print>> does not exist"

i updated C+ vredist
and restarted the computer.
uninstalled, then reinstalled twine, and sugarcube with the correct .py file.

Your help is greatly appreciated in advance.
Thank you, and have a nice day.

Comments

  • and the macro does not exist message happens everytime there was <<set>> or <<print>> command
  • Please ignore this post. I am an idiot, and have no programming expression

    i was doing <<set>> and <<print>> with Capitals <<Set>> and <<Print>>
  • Please use the code tag—it's C on the editor bar—when posting code or markup.


    You've already figured out case sensitivity so I won't mention it further.

    interyoon wrote: »
    I have StoryInit page that states :

    <<nobr>>
    <<set //initalising

    state.active.variables.Arrows = 0
    state.active.variables.Food = 0
    state.active.variables.Money = 0

    >>
    <<endnobr>>
    That set should be something like either one of the following:
    /*
    	A single <<set>> invocation with multiple variable assignments
    	separated by commas.
    */
    <<set
    	$Arrows = 0,
    	$Food = 0,
    	$Money = 0
    >>
    
    /*
    	Multiple <<set>> invocations, each with a single variable assignment.
    */
    <<set $Arrows = 0>>
    <<set $Food = 0>>
    <<set $Money = 0>>
    
    The latter is likely safer for a self-proclaimed newbie.


    Also. You don't need to use <<nobr>> there. Using the <<nobr>> or <<silently>> macros or the nobr tag with the PassageDone, PassageReady, or StoryInit special passages is pointless as they produce no output. See Special Names for more information on special passage, tag, and variable names.

    interyoon wrote: »
    and also StoryMenu page with

    You have <<Print $Arrows>> Arrows
    Food = <<Print $Food>>
    You are currently carrying $<<Print $Money>>

    <<back>>
    You cannot use the StoryMenu special passage in that way as it only accepts links and will ignore anything else. The StoryCaption special passage will do what you want.

    If that seems to be working as-is, then you are not using SugarCube—it may be installed, but you are not using it—and are likely using Sugarcane or one of the other vanilla story formats. Use the Story > Story Format menu to switch formats.
Sign In or Register to comment.