0 votes
by (200 points)

Using Harlowe 1.2.3. So I posted about a week ago about the same issue and received some good feedback on how to improve the formatting of my (if:) (else:) statements however I have started my entire project again only to come across the same issue. 

When I use the following code: 

{
(if: $murder)[
(set: $murder to false)
[[Break in <- Try Again?]]
[[Start Over?]]
]
(else-if: $package)[
[[Speak to the goblin]]
[[Speak to Zenet Bruchna]]
[[Leave 2 <- Leave]]
]
(else:)[
[[Speak to the goblin]]
[[Leave 2 <- Leave]]
]
}

A passage is auto-created for 'Speak to Zenet Bruchna' but not for 'Speak to the Goblin' or for 'Leave 2'. 'Start Over? and 'Break in' automatically link to pre-existing passages but creating passages for the two missing links has no effects. I have tried using this but it had no effect: 

{
(if: $fireball)[
(link: 'Speak to the goblin')[(goto: 'Speak to the goblin')]
(link: 'Speak to Zenet Bruchna')[(goto: 'Speak to Zenet Bruchna')]
(link: 'Leave')[(goto: 'Leave')]
]
}

 

1 Answer

+1 vote
by (159k points)

I cut-n-pasted your first example into a new Passage and the expected five missing passages were automatically created when I closed the Passage Editor. (using the small X in the top left corner of the dialog)

I did notice some syntax and target passage naming issues with your first example:

1. The Target Passage Name of a Markup based link should be a valid name and should not begin or end with space characters, because the Automatic Create Missing Passage feature may include those spaces when it names the newly created passage.

[[Break in <- Try Again?]]	<== BAD LINK

[[Break in<-Try Again]]		<== GOOD LINK

2. It isn't a good idea to include punctuation characters (like question mark, colon, quotes, etc..) in a Passage name, because these characters can have special mean in web-development technologies, and may also interfere with the story format's ability to locate the passage.

The Automatic Create Missing Passages feature of the Passage Editor and the Determine Links Between Passages feature of the Passage Map only support standard Markup based links, which is why the (link:) macro based links in your second example will neither create the missing passages or show as connections within the Passage Map.

by (200 points)

I've encountered a development in with this issue that may help in unraveling the mystery. When I changed the code to no longer include the (if-else:) it started working, 

{
(if: $murder)[
(set: $murder to false)
[[Break in <- Try Again?]]
[[Start Over?]]
]
(else:)[
[[Speak to the goblin]]
[[Speak to Zenet Bruchna]]
[[Leave 2 <- Leave]]
]
}

Despite the fact I kept the punctuation in there. I then went on to create another package which was working normally until I added and (if:) statement, 

{
(if: $package)[
[[Here you go]]
[[Nope]]
]
(else:)[
[[Nope]]
]
}

The passage for [[Nope]] was automatically created but when I changed it to being and (if:) (else:) it suddenly disconnected. 

...