Harlowe - How can I avoid this bug?

0 votes
asked Jul 9 by Chris Cotterill (120 points)

I'm a bit of a novice at computer codes. I've been trying to make a game. I've run into a few problems been able to solve them using the advice on these messageboards.

If someone has asked this question before, please accept my apologies for wasting your time and just post a live link to where it is answered.

The origin passage reads like this:

Current health $health
Current gold $gold

(if: $gold > 4) [
You arrive at the sea of troubles where an old fisherwoman stands on the shore looking out at the horizon.

"I will teach you the spell you wish to learn, but you must pay me five golden pieces." She says.

[[give her the gold]] ]

(else:) [
You arrive at the sea of troubles where an old fisherwoman stands on the shore looking out at the horizon.

"I will teach you the spell you wish to learn, but you must pay me five golden pieces." She says.

You tell her you do not have enough gold.

"Then you must swim to that island, where Keith the pirate buried his treasure, and bring me the gold!"

[[swim to the island]]
(if: $ownicestaff is 1) [ [[freeze the sea to create a path to the island]] ] ]

The passage [[give her the gold]] reads like this:

(set: $gold to $gold - 5)
(set: $seaspell to 1)
Current health $health
Current gold $gold

She begins to chant in her salty-fishy voice.

(live: 2s)[
        (stop:)
//You have learnt the Sea Spell.//
]
(live: 4s)[
        (stop:)
"This spell will give you power over all creatures that dwell in water."

[[return to the hut |leave the hut]]

Whenever I test the game, when I click on [[give her the gold]] I get the "Sorry to interrupt, but this page's code has got itself in a mess" error message.

 

Any ideas?

1 Answer

0 votes
answered Jul 9 by Jherek (2,940 points)
was it lost when copy-pasting or is there really a ] missing which would close the the (live: 4s)[...   construct?
commented Jul 12 by Chris Cotterill (120 points)
That was the problem! Now my game works.

Thank you so much for your response, Jherek!
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...