Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Issue with the print macro, setter links and strings

$
0
0
I am using SugarCube 2.7.2 on Twine 2.0.11

The passage in question contains the following for loop:

<<for $i to 1; $i <= $Total; $i++>>

Straightforward, and works fine in other passages. This for loop then contains the following print macro:

<<print "[[Text|Passage][$Active to $Item[" + $i + "]; $Item[" + $i + "].Property to 3]]">>

This appears to function just fine. But if I swap the second set macro from a number to a string, it no longer works:

<<print "[[Text|Passage][$Active to $Item[" + $i + "]; $Item[" + $i + "].Property to "string"]]">>

"Error: <<print>>: bad evaluation: Unexpected identifier" is the error message in question.

$Item[$i].Property was set to 1 prior to this passage.

Setting the second setter link to "$Active.Property to "string"" did not solve the problem.

What am I missing?

Viewing all articles
Browse latest Browse all 1844

Trending Articles