Howdy, Stranger!

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

What does this mean? ::

edited September 2014 in Help! with 1.x
This may be a really dumb question, but I see this given as code in some answers in the forum. Ive looked at the twine FAQ, and I can't find any explanation.
What does it mean if I see :: and I think a passage name following it??

for example -
::inventory (in a passage titled "inventory")
<<set $_i to 0>><ul><<inventory_>></ul>

::inventory_ (in a passage titled "inventory_")
<<if $_i lt $inventory.length>>\
<li><<print $inventory[$_i]>></li>\
<<set $_i to $_i + 1>><<inventory_>>
<<endif>>

Comments

  • Haelu786 wrote:
    ::inventory (in a passage titled "inventory")
    <<set $_i to 0>><ul><<inventory_>></ul>

    ::inventory_ (in a passage titled "inventory_")
    <<if $_i lt $inventory.length>>\
    <li><<print $inventory[$_i]>></li>\
    <<set $_i to $_i + 1>><<inventory_>>
    <<endif>>


    ::inventory means "in a  passage titled 'inventory'". If you're compiling directly to twee rather than using the Twine application, that's how you designate a passage.
  • ah ok. I only know Twine. Not Twee.

    So if I was implementing this code in Twine, I would just enter these pieces of code in 2 separate passages as described
  • Haelu786 wrote:

    So if I was implementing this code in Twine, I would just enter these pieces of code in 2 separate passages as described

    Yes.

    When reading a twee file the :: indicates the start of a new passage, the word(s) after the :: is the Title of the passage. The line of text may end with one or more words between a set of open / close [] square brackets, these words indicate the passages' tags.

    eg.

    :: Start
    The previous line indicates a passage Titled "Start" with no tags.

    :: Story Look and Feel [stylesheet]
    The previous line indicates a passage Titled "Story Look and Feel" with a single tag of "stylesheet", so in other words a Stylesheet Passage.

Sign In or Register to comment.