0 votes
by (150 points)
edited by

Merry Thursday, gentle humans.

Been making a thing in Twine 2/Harlowe for over a year now.

Recently dusted off the project and stumbled across the (for: ) macro: https://twine2.neocities.org/#macro_for

Thought "this is so great, exactly the thing that I needed a year ago, too bad I did dozens of hours of work for a janky thing to use instead, LOL".

But I finally decided to upgrade and convert over some of my bizarre (live:) macro monstrosities.

Unfortunately it seems that the (for:) macro, which seemed like the sole thing worth the trouble of upgrading for, is still unrecognized for me in the latest Twine standalone 2.1.3, running the Harlowe story format (v 2.0.1). I'm on Mac OSX Sierra, 10.12.5.

Code:


(for: each _topic, ...(datavalues:$topics))[
		(set:$topicID to _topic's ID)
		*DEBUG: topicID: $topicID *
			
]

Note that the "(for:" part of the code is, in my Twine 2.1.3 app, highlighted in a striking vivid orange shade, which would seem to indicate that it is an unrecognized syntax.


Screenshots of resulting error when running the passage ('unexpected identifier' where for should be processed... also ...

http://tinypic.com/r/2d9r6o9/9

http://tinypic.com/r/iwj50z/9

Help would be greatly appreciated. Blessings to you all.

1 Answer

0 votes
by (63.1k points)
selected by
 
Best answer
In your picture, it appears you're running a version of Harlowe with a white background. Did you edit the CSS? Harlowe 2.x has a black background with white text by default.

Can you double check your story format to make sure you're using Harlowe 2.0.1, not Harlowe 1.2.4? That's my guess, anyway; the code seems fine.
by (150 points)
You called it - I had checked that my Twine's "default story format" was the new Harlowe, but I didn't realize I still had to open my story and use the "Change Story Format" menu.

 

Now all is well! Except that my story is light-on-black color again! I sure wish I could remember how I changed that before!

 

So happy to have a working (for:) macro!  

 

Thanks for pointing me in the right direction Chapel. You are a scholar, a gentleman, and a lizardperson (but you can only be two of these - so choose wisely)!
...