Hi, I'm brand new to twine and running into some difficulties.
First, I am getting a "missing ] after element list error" for the following hook:
leaving me behind in a pool of my own(if: $bloodied lte 1) [[[blood. | Art Gallery]]]
I did put an extra bracket at the start and end but it doesn't register I guess?
Second, I have a "Missing ) after argument list" for the following:
(if: $light is 0 and not $history: contains "Art Gallery")
I'm guessing I need some parentheses for adding the not history condition but I've tried multiple combinations and all of them return syntax errors. Is there something about using "and" statements I don't understand?
I also couldn't find any documentation about using "setter links" to alter variables in this version.
Any help would be greatly appreciated!
Comments
You have two issues here:
[list type=decimal]
There is no
lte
operator in Harlowe, you want the<=
operator. That's what's causing the "missing ]" error.You probably do not want to put leading/trailing whitespace in your link markup. Harlowe treats leading and trailing whitespace in the link markup as significant, meaning your like goes to
" Art Gallery"
(note the leading whitespace) instead of"Art Gallery"
as you probably intended.You murdered the
(history:)
macro and it seems that you must wrap the history contains expression in parens or it breaks when used with thenot
operator. For example:Setter links do not exist in Harlowe, though someone may have figured out a workaround. SugarCube has them. I'm unsure about Snowman.
Small syntax error in your code, (history:) is a macro so you don't want/need a $ before the macro name.
Try without the extra $:
(history:)
not($history:)
. There is no dollar sign ($
) in macro names (that's the $variable sigil).I must've looked at that line a hundred times I can't believe I didn't notice that -.- Thanks for being patient with me, can you tell this is the first programming-esq thing I've ever done? P:
I created a game that's a personality quiz, and I want to display different sentences based on what passages the reader has visited. This is what I have so far:
(if: ((history:) contains "SlantRight"))You are a people person with a nice balance between your head and your heart.
(if: ((history:) contains "SlopeDown"))You can be pessimistic and worry easily.
The problem is that both sentences appear even if those passages are not visited. Can anyone help me with the syntax?
Try the following: NOTE: Even though the Harlowe documentation shows many examples of the (if:) macro without the square brackets they are required, as show by the following example from there: