SyntaxError: Expected ';'

I have recently completed writing a text game using Squiffy, but every time I try and run the game it appears with the phrase, "SyntaxError: Expected ';'". Whenever I try and preview the game I just get a blank page. I'm running off the browser version of Squiffy i.e. have not downloaded any version. My three other Squiffy games still work fine even after editing them today, just not this most recent one. Does anyone know why? Should I supply my code in another post?

Sounds like you're missing a ;.

Post the code, and we'll check it out and get you going.

I tried posting my code but it keeps saying "Sorry, you can't post that here." Is there meant to be a ; used now in some part of the code? I've written the game like all the other ones so I don't know why this one isn't working. Thanks for helping me solve this :)

@title Heroes and Monsters: Perseus and Medusa

Welcome young heroes and heroines to the world of Ancient Greece! Together, we shall explore the land of Greece and it's many islands and cities, searching for the most extraordinary of stories, featuring both triumphs of gods and men. From the frenzied deserts of Troy to the shores of Crete, to the woodlands of Thrace and the blinding white marble of Athens, we shall experience some of greatest folk tales ever told!

[[We await your commands]].

[[We await your commands]]:

Then let us begin!

While our story today concerns Perseus, fabled prince of [Argos], our story does not start with him. Instead, we must look to his grandfather, King Acrisius, to start this tale.

King Acrisius had offended the gods by being stern and cold, and in turn the gods had placed a curse on him, that one day he would be killed by his own grandson. Fearful of this prophecy, Acrisius locked his only daughter, Danae, in a tower in their palace, to stop her from ever presenting an heir.

The gods, angry that Acrisius was trying to meddle in their plans, hatched a scheme. They sent [Zeus], king of all the gods, to visit Danae, and make her pregnant, producing an heir to kill Acrisius.



Geography: Argos is a city in Argolis in the Peloponnese region in southern Greece. It is not to be confused with Argos, the shipwright of the Argo in the story of Jason and the Argonauts.


Mythology: Zeus is the king of all the gods and resides on Mount Olympus with his wife Hera. He is well known for fathering several children with mortal women, much to Hera's annoyance. He is represented by lightning bolts.


Once Acrisius found out that Danae had produced a son that in time would kill him, he tried to get rid of the child. He could not bring himself to kill his own family, so instead he dragged his daughter and baby grandson to the harbour and threw them onto a boat, before pushing it out onto the waves, letting it drift away into the raging sea.

Danae held onto her baby, praying to the gods to save her. The gods, not wanting to be out-played by a mortal king, combined their efforts to save Danae and Perseus.

The [Anemoi] blew incoming storms away and [Poseidon] calmed the sea, guiding the boat safely to a far away kingdom, where Acrisius could not be tempted to send a solider to finish the job.



Mythology: The Anemoi are the wind gods, each one a particular direction. They were Boreas, the north and winter wind, Zephyrus, the west and spring wind, Notus, the south and summer wind and finally, Eurus, the east and autumn wind.


Mythology: Poseidon is the god of the seas, earthquakes and the creator of horses. He does not live on Mount Olympus like the other gods, rather he lives under the sea, keeping an eye on his domain. His Roman form in called Neptune.


The boat carrying Danae and Perseus soon landed safely on the shores of [Seriphos]. A local fishermen, Dictys, could not believe his eyes when the rowing boat gently floated onto the sand. He grabbed the bow and dragged the boat further onto the beach, before helping the woman and her baby out onto land.

Dictys took care of Danae and her son, and soon Perseus grew to be a strong and smart young man. Dictys taught him how to fish both with net and spear, his mother taught him the etiquette of the royal court and he practiced [sports and wrestling] with the other men of the island, honing his fighting skills.

The king of Seriphos, Polydectes, eventually heard about the mysterious arrivals to his kingdom; the woman more beautiful than he could imagine and her son, a fearsome athlete. He sent for them to be brought to his palace at once.



Geography: Seriphos (also written as Serifos) is a Greek island in the middle of the Aegean Sea and was ruled over by King Polydectes (also written as Polydektes).

[sports and wrestling]:

Culture: Greek culture was heavily steeped in sports, creating such events as the Olympics where men would compete their skills in track and field events. The Greeks also liked to wrestle in a style called Pankration, which translates to "all powers", because the sport is no-holds-barred.


Danae and Perseus were brought to Polydectes' palace and were presented to the king. As soon as he set eyes on her, Polydectes fell in love with Danae and made plans to marry her. There was just one problem; Perseus.

Polydectes knew Perseus was well-known and loved by the islanders and if he killed him the citizens would be in uproar. So Polydectes hatched a plan. He had to rid Perseus if he was to marry Danae.

"Perseus, I hear you are an exceptional athlete," Polydectes spoke. "I wish for you to claim a prize for me, to pay for my generosity for allowing you stay in my lands."

"Anything your majesty," Perseus declared.

Polydectes smiled cruelly before stating, "I wish for you to collect the head of the [Gorgon Medusa]!"


[Gorgon Medusa]:

Mythology: The Gorgons were female creatures that had venomous snakes for hair. They could turn anyone who looked directly at their face into stone. Their names comes from the Greek word "gorgos", which means dreadful.


The royal court gasped in shock. The Gorgons were feared throughout all of Greece and were thought to be immortal. Polydectes was setting Perseus an almost impossible task.

"And if I refuse?" Perseus asked.

"Then you will be thrown back into the [sea] from where you came from and I will marry your mother!" Polydectes roared.

"Very well your majesty, I will set off tomorrow to find the Gorgon's head," Perseus replied, before turning on his heel and heading back to house to prepare.



Geography: The Aegean Sea is the main water mass around the islands of Greece. It is named after King Aegeus, who threw himself into the sea when he thought his son, Theseus, had died. The Aegean was originally known as the Archipelago (which means "chief sea"), but the word now means a collection of islands.


Perseus was unsure of what he would need for his journey, so he visited the temple to ask the gods for their help. As he prayed, [Athena] appeared before him.

"Polydectes has set an impossible task for a mortal," Athena said, "But he does not know you are Zeus' son, and as your siblings, the gods shall help you."

More of the [pantheon] appeared before Perseus, each offering their services. Ares offered his sword, the strongest of all blades. Hermes offered his winged sandals, so that Perseus may fly with speed to the Gorgon's lair. Apollo gave his shield to protect Perseus and Athena gave her helmet of invisibility, to aid in getting close to the Gorgon.

Perseus thanked them for their gifts and asked them to watch over his mother while he was away. They agreed, so Perseus sprang into the air on Hermes' sandals and onto Medusa's lair.



Athena is the goddess of Wisdom and War. She sprang already grown and in full battle armour from the top of Zeus' head. She gave the olive tree to the citizens of Athens, hence why the city bears her name.


Mythology: The Pantheon was the council of the Twelve Greek Gods; Zeus, Hera, Poseidon, Ares, Athena, Dionysus, Aphrodite, Apollo, Artemis, Hermes, Hephaestus and Demeter. Between the twelve gods and goddesses, they controlled nearly every facet of human life.


Hermes' sandals guided themselves towards Medusa's lair, far away from civilization. As he sped on, an [owl] flew next to him. It opened its beak, and from it, the voice of Athena spoke.

"Remember Perseus," Athena called, "Never look directly into Medusa's eyes. She has the power to turn men to stone with her gaze. Apollo's shield is reflective, use this to safely see where the Gorgon is. When you attack, aim for her head. She is a strong creature, anything less will not defeat her."

Perseus thanked her for her wisdom and the owl flew away, leaving Perseus alone again. As the sun set and the night drew in, Hermes' sandals began to slow down, until they softly landed Perseus outside a dark cave. Perseus summoned up all of his courage, before pacing one foot in front of the other and...

...[[entered the cave]].


Wildlife/Mythology: Owls were the patron animal of the goddess Athena. She is the goddess of Wisdom, hence why owls are sometimes thought of as being wise.

[[entered the cave]]:

Perseus stole through the cave, trying to keep his footsteps as quiet as he could. The cave soon became smaller and smaller, until Perseus was crawling on his hands and knees just to fit through the passageway. He continued on until finally, the small passage opened up into an expansive cavern.

Perseus gasped at the sight before him. Beautiful wall murals, stone columns that reached higher than he could see, a manner of jewels and gold coins strewn across the floor, and many brave warriors, still in their suits of armour, frozen forever in stone. It looked to have been a temple before the hellspawn had made it its home. The Gorgon Medusa lay in the middle of the cavern, sleeping silently surrounded by her horde.

Perseus began to make his way to her, but did not see a large chest overflowing with coins. As he moved past it, his sandal caught the edge and knocked it over, scattering coins all over the floor. The Gorgon's eyes flickered open, sensing an intrusion in her lair. Perseus hid behind the nearest stone pillar as the Gorgon stood up and began exploring her cave, searching for the intruder.

[[Tutorial to fight Medusa]].

[[Tutorial to fight Medusa]]:

  1. Perseus has three objects; his reflective shield to find where Medusa is, his Helmet of Invisibility to move around her, and his sword to deal the killing blow.

  2. Use each one at the correct time to defeat Medusa.

  3. Remember the advice Athena gave Perseus on how to kill Medusa. The Gorgon is dangerous and could easily kill Perseus in one strike.

Good luck!

[[Begin the fight]].

[[Begin the fight]]:

Perseus could not see Medusa, but could hear her moving around close to the pillar where he hid. What should he do?

[[Attack with his sword?]]

[[Use his shield?]]

[[Put on his helmet?]]

[[Attack with his sword?]]:

Perseus drew his sword and turned around the pillar to face the Gorgon. He raised his sword but was immediately stopped in his place by her hideous face. Her grey flabby skin, serpent hair and long, pointed teeth filled Perseus with fear.

Medusa rounded on Perseus, her eyes locked on his. Perseus tried to move but his legs would not carry him. He looked down to see stone creeping its way up his legs. He cried out in terror as his arms turned to stone, then his eyes, and finally is heart, forever keeping him within Medusa's lair.

                            YOU DIED

Click the Restart button at the top of the page and see if you can help Perseus defeat Medusa.

[[Put on his helmet?]]:

Perseus decided the best plan was to gain some distance between himself and Medusa, so placed the helmet Athena gave him on his head. As soon as it touched his hair, he became invisible.

He turned around the pillar and almost bumped into Medusa, who had heard his fumbling with the helmet and came to investigate. Perseus jumped back, momentarily frightened by the Gorgon, and lost his footing.

Perseus landed hard on the floor, inadvertently knocking his helmet off. Medusa was surprised at the sudden appearance of the young man in front of her and charged him. Perseus tried to grab the helmet but it was too far out of his reach. He made one last attempt but he was thwarted by Medusa, who leapt on him like a lion and tore him to shreds with her sharp talons.

                            YOU DIED

Click the Restart button at the top of the page and see if you can help Perseus defeat Medusa.

[[Use his shield?]]:

Perseus readied his shield, but instead of rush the Gorgon, he held it up to reflect what was behind the pillar. He saw the Gorgon, shaking her head from left to right, trying to find the intruder. She hadn't found him yet! Medusa started to make her way towards Perseus' pillar, but as he could see her well in advance, he was able to shift around the pillar and away from her line of sight.

Perseus moved further away to give him time to plan his next move. What should he do?

[[Attack with the sword?]]

[[Sneak up with his Helmet of Invisibility?]]

[[Attack with the sword?]]:

Perseus drew his sword and tried to move through the cavern. He was too busy fixated on Medusa, ready to jump away if she turned around, that he bumped into a gold statue holding rare jewels, knocking it over. Perseus tried to fix his error, but the statue came clattering down, the jewels smashing as they hit the floor.

Medusa wheeled around at the sound, and fixated her gaze upon Perseus. Perseus tried to move but his legs would not carry him. He looked down to see stone creeping its way up his legs. He cried out in terror as his arms turned to stone, then his eyes, and finally is heart, forever keeping him within Medusa's lair.

                                YOU DIED

Click the Restart button at the top of the page and see if you can help Perseus defeat Medusa.

[[Sneak up with his Helmet of Invisibility?]]:

Perseus needed to get closer to the Gorgon without her seeing him, so he placed Athena's helmet upon his head, turning him invisible in an instant. Now that he didn't have to watch Medusa at all times in case she turned around, Perseus could focus on making his way through the cavern without disturbing any of the items placed around the room.

After a few tense minutes of crossing and re-crossing across the room, trying not to give his placement away, Perseus found himself at Medusa's back. He drew his sword, ready to strike, but where should he attack?

[[Her head?]]

[[Her back?]]

[[Her leg?]]

[[Her back]]:

Perseus raised his sword high in the air, before swinging it down forcefully. Medusa screamed in pain as Perseus drove his sword into her back. She tumbled forwards, away from Perseus. Medusa looked wildly around, trying to find her foe.

As Perseus moved closer, Medusa leant down and scooped up a set of coins on the floor in front of her. She threw them hard, scattering them around the room. Perseus could not move out of the way in time and one hit him in the chest. It dropped to the floor, telling Medusa exactly where Perseus was.

Medusa leapt at the air, swinging her claws, in an attempt to catch him. One swipe caught Perseus across the chest, dropping him to his knees. Even though he was still wearing the Helmet of Invisibility, Medusa had a straight blood trail to follow. Perseus tried to move, but Medusa attacked the pooling blood, killing Perseus within seconds with her powerful talons.

                            YOU DIED

Click the Restart button at the top of the page and see if you can help Perseus defeat Medusa.

[[Her leg?]]:

Perseus swung low with his sword. He thought if he could cripple the Gorgon, it would be easier to kill her. The sword cleaved Medusa's leg from her body, making her topple over and clatter into one of her stone statues, breaking it in two. She dropped onto her hands and her other leg.

While Perseus thought he would have the advantage against a weaker opponent, Medusa became enraged at the loss of her leg. She moved on all fours like a lion, charging at where the attack came from. Perseus could not move in time and was knocked over by the Gorgon, his helmet flying off and into a dark corner.

A little winded, Perseus managed to stand, but as he raised his head, he found himself face-to-face with Medusa. She fixated her gaze upon Perseus, slowly turning him into stone. Once his eyes had turned a cold grey, she took another swing at his body, destroying the statue with one swipe of her claw.

                            YOU DIED

Click the Restart button at the top of the page and see if you can help Perseus defeat Medusa.

[[Her head?]]:

Perseus remembered what Athena said to him before he entered the cave. He raised his sword high into the air, before bringing it down in one strong motion, cleaving Medusa's head from her body. Her torso remained standing for a few seconds, her arms swinging madly about in a vain attempt to kill whoever had beheaded her, but soon her knees gave way and her body fell to the ground.

From the stump of her neck, a small creature arose. A winged horse, dazzlingly white, clambered out of Medusa's body. Its name was Pegasus. The horse stretched its wings, before rearing up onto its hind legs and crashing through the crawlspace Perseus had come through, flying away from the cave it had been birthed in.

Perseus searched the cavern and found a small sack to place Medusa's head into. Even though her head was separated from her body, her stare could still turn men to stone. He hoisted the sack onto his back and prepared to fly back to Seriphos.

[[Exit the cave]].

[[Exit the cave]]:

As soon as Perseus clambered out of the cave, Hermes' sandals took flight once again, taking him across the mountains and forests, back towards home. As he flew on, he heard a small cry float in on the wind. At first he thought it was a trick on his mind, but then he heard it again, a cry of "Help!" followed by a scream.

He commanded Hermes' sandals to follow the cry, and soon saw a young woman, stranded on a cliff-face. Below her was the raging sea.

"How did you come to be here?" Perseus called down to the girl.

"My father is sacrificing me to Posiedon," The girl responded, "He offended the god of the sea, and he set a sea serpent on our kingdom."

The girl pointed out to the horizon, and [[Perseus followed her gaze]].

[[Perseus followed her gaze]]:

Due to the raging sea it was hard to see anything a first, but then Perseus saw the spinal fins of a sea serpent, heading straight for the girl. He knew he must defeat this creature and save her and her kingdom, wherever it might be.

Perseus flew high and waited for the serpent to approach the rock. With a crash, the Serpent rose out of the sea, ready to strike at the girl. As soon as Perseus saw that the serpent was about to attack, he swooped down on his flying sandals, and slashed it across the neck with his sword.

The serpent hissed in pain, and moved away from the girl and focussed its attacks on Perseus, but every time it would try to bite him, Perseus would just fly higher than it could reach, before swooping down again to continue attacking it with his sword. After many blows, the creature finally fell back into the sea, leaving the kingdom forever.

Perseus picked up the girl and brought her back [[to her kingdom]].

[[to her kingdom]]:

On the journey back, Perseus found out that her name was Andromeda, and that she was the daughter of King Cepheus of [Aethiopia].

When he returned their daughter, Perseus made an offer to the king.

"Your majesty, I am Perseus, son of Zeus and rightful heir to Kingdom of Argos. Please, my I take your daughter to be my bride?"

Cepheus was glad that his kingdom was safe due to the brave actions of Perseus, so did not even give a moment's hesitation. Perseus picked Andromeda up and together they took off into the air. After a short flight back, [[they landed in Seriphos]].


Geography: Aethiopia is an ancient region and refers to a section of land of the upper Nile region (where Egypt is situated today), as well as more general areas of the Sahara Desert and the continent of Africa. It is referred to in two other Greek poems, the Iliad and The Odyssey, both written by Homer.

[[they landed in Seriphos]]:

Perseus quickly reunited with his mother, and made offerings to the gods at the temple, before marching to the palace. Polydectes was already picking out wedding decorations when Perseus strode through the door, so convinced that the young man could not have completed his task.

"So then, young Perseus," King Polydectes called out. "Have you returned with your gift for me?"

"I have," shouted Perseus, "Lay your eyes upon the head of the Gorgon Medusa!"

Perseus closed his eyes and ripped the head from the sack on his back, holding it aloft for Polydectes and his court to see. What started as shock and surprise at the reveal of the creatures head soon turned to terror as Polydectes and his aides were turned to stone within an instant. The cruel reign of King Polydectes had ended, and his people were free.

But our story does not end here, dear reader. For there is still one prophecy left to [[come true]].

[[come true]]:

Perseus, along with his mother, his step-father and his new bride Andromeda, set sail back to Argos, from where he had been cast out as a child, to claim his rightful place within the royal court.

The journey was a short one, and as the four departed their boat and set foot on Argos, they realised a sports tournament was being held that day within the city. Perseus, being a man of noble birth and deeds entered into the contest. There was only one field event left, [the discus throw]. Perseus was the last contestant of the day.

Perseus had trained in the discus throw back on Seriphos, and he knew his throw was straight and true. Just as he predicted, his throw soon surpassed all the other contestants...but the gods had other plans. A gust of wind, one of the many that saved Perseus and his mother when they had been thrown to the sea, hoisted the discus far away from the playing fields.

It continued, soaring across the city, [[towards the palace]].

[discus throw]:

Culture: The discus throw is sport that was part of the Ancient Olympic Games, in which a competitor throws a heavy disc in an attempt to have thrown it the furthest out of all the competitors.

[[towards the palace]]:

King Acrisius stood from his balcony in his palace, surveying his city from the highest point on the island. He did not see the discus, thrown from many miles away, heading straight towards him. One final breath of air guided the discus down, hitting Arcisius on his ankle, tripping him. He fell the floor, and the sudden shock killed him instantly.

The gods had finally come true on their promise that Acrisius' grandson, Perseus, would kill his grandfather. Perseus would only find out when he and his mother arrived at the palace looking for their kin. While he was saddened at his grandfather's death, Perseus soon took to the throne alongside his bride Andromeda, and ruled Argos for many years.



                                GAME OVER

If you're reading this then well done, you made it! You successfully took on the Gorgon Medusa, defeating her and rightfully restored Perseus to his throne.

Thank you for playing this instalment of Heroes And Monsters. Check out our other stories inspired by Greek Mythology, as well as titles outside the Heroes and Monsters collection.

Sorry for doing so many posts, but this was the only way to get all the code posted. The posts should lead one from one another, with no duplications of text.

Are there 4 spaces in front of "YOU DIED" and "GAME OVER" by any chance?

(This is a guess, but it looks like that's what's happening.)

If so, Squiffy will probably think that's supposed to be Javascript, which is closed out with a ;.

If this is the case, adding semi-colons wouldn't help.

You'd need to remove the spaces before "YOU DIED" and "GAME OVER".

That looks like an enjoyable game, by the way!

I had used a combination of tabs and spaces to get them in the middle. Even after I took out the spaces I was still getting the message. I think it has something to do with the final Game Over. I've used it before in previous games, but had some text between the [[new section]] and the tabbed GAME OVER. In this game it went straight from the [[new section]] to the tabs. When I took the tabs out then the game works fine. I don't know why it wouldn't work beforehand but at least it's figured out. Thanks for your help!

This topic is now closed. Topics are closed after 60 days of inactivity.