{(set: $WarlingtonCorruption to 100)
(set: $ButcherOfWarlingtonIntroComplete to "false")
(set: $ButcherOfWarlingtonComplete to "false")
(set: $AshobiRecruited to "false")
(if: $ButcherOfWarlingtonIntroComplete is "false")[
(set: $FirstWarlingtonDescription to "A shifty looking man stands in a dark corner of the town square.")
]
(else:)[
(set: $FirstWarlingtonDescription to "Jackson is waiting for you.")]
(if: $ButcherOfWarlingtonComplete is "true") then (set: $FirstWarlingtonDescription to "The Butcher of Warlington has been dealt with and Jackson is thankful.")
(if: $AshobiRecruited is "false")[
(set: $SecondWarlingtonDescription to "A female dark elf is standing outside of a tavern.")]
(else:)[
(set: $SecondWarlingtonDescription to "")
]}
Corruption: (print: '<progress value="' + (text: $WarlingtonCorruption) + '" max="100"></progress>')
You are standing in the middle of Warlington. $FirstWarlingtonDescription $SecondWarlingtonDescription
Where do you want to go?
[[Market->WarlingtonMarket]]
[[Forest]]
[(if: $ButcherOfWarlingtonIntroComplete is "false")[[Talk to the shifty man.]]
(else:)[[Talk to Jackson.]]]
(if: $AshobiRecruited is "false")[[Talk to the dark elf.]]
{
(set: $health to 100)
(set: $sword to 0)
(set: $coins to 5)}
It says that ‘The (if:) changer should be stored in a variable or attached to a hook.’ at the very top, and before the (else:) statement before ‘Talk to Jackson.’ it says ‘There’s nothing before this to do (else:) with.’
1: The following line in your code example has the word then where I assume you meant to place the open square bracket [
of an associated Hook, and the related close square bracket is also missing.
(it appears you may be mixing the syntax of different programming languages)
(if: $ButcherOfWarlingtonComplete is "true") then
2: The three (if:)
/(else:)
macro calls after your [[Forest]]
markup based link are each missing their associated Hooks, in which the related markup links should be placed.
[
(if: $ButcherOfWarlingtonIntroComplete is "false")[[Talk to the shifty man.]]
(else:)[[Talk to Jackson.]]
]
(if: $AshobiRecruited is "false")[[Talk to the dark elf.]]
3: You are using the String values of “true” and “false” in situations where the Boolean values of true and false appear to be better suited.
If I understand the purpose of your code example correctly then the following may achieve your desired outcome.
(untested code)
{
(set: $WarlingtonCorruption to 100)
(set: $ButcherOfWarlingtonIntroComplete to false)
(set: $ButcherOfWarlingtonComplete to false)
(set: $AshobiRecruited to false)
(if: $ButcherOfWarlingtonComplete)[
(set: $FirstWarlingtonDescription to "The Butcher of Warlington has been dealt with and Jackson is thankful.")
]
(else-if: $ButcherOfWarlingtonIntroComplete)[
(set: $FirstWarlingtonDescription to "Jackson is waiting for you.")
]
(else:)[
(set: $FirstWarlingtonDescription to "A shifty looking man stands in a dark corner of the town square.")
]
(set: $SecondWarlingtonDescription to "")
(unless: $AshobiRecruited)[
(set: $SecondWarlingtonDescription to "A female dark elf is standing outside of a tavern.")
]
}
Corruption: (print: '<progress value="' + (text: $WarlingtonCorruption) + '" max="100"></progress>')
You are standing in the middle of Warlington. $FirstWarlingtonDescription $SecondWarlingtonDescription
Where do you want to go?
[[Market->WarlingtonMarket]]
[[Forest]]
{
(if: $ButcherOfWarlingtonIntroComplete)[
<br>[[Talk to Jackson.]]
]
(else:)[
<br>[[Talk to the shifty man.]]
]
(unless: $AshobiRecruited)[
<br>[[Talk to the dark elf.]]
]
(set: $health to 100)
(set: $sword to 0)
(set: $coins to 5)
}