Getting an error


#1

I haven’t used choicescript for over a month so have started a new game and have got an error that I cannot spot where the problem is.

The file says it is in line 1121 but I have only got to line 100?

Here is the startup code

***
You stand outside the gates of St Gregory’s.
The silence of the graveyard combined with
the mist clinging to the ground to
give the place an creepy atmosphere.

You reach out and pull open the wrought iron gates which open with a loud creak.
Stepping into the cemetery you stare at the rows of graves. You glance briefly at the wet grass at your feet.
*choice
#My suit is going to be ruined.
*set gender “Male”
*set colleague “Zoe”
*goto cemetery

#My shoes are going to be ruined.
*set gender “Female”
*set colleague “Dean”
*goto cemetery

*label cemetery
Carefully you continue further into the cemetery.
you study each grave as you pass. You are surprised
to see most of them are quite ancient.

The dates of death ranging from the early 1800s to the mid 1900s.
This didn’t bode well for you. You make a mental note
to have a word with ${boss}. He was going to
have to charge the client more for the job.

You finally locate what you are after, the soil
of the grave has recently been disturbed.

You pull a box out of your bag and pull out three seperate parts.
You quickly fix them together and complete the shovel.

The sound of your phone disturbs the silence.
You snatch it out your pocket and answer…

[How do you introduce yourself?]

*choice
*input_text

*page_next
“Hello, ${name} speaking. Who is this?”

“Sorry to bother you, ${colleague} gave me your number said you could help me.”

“I’m in the middle of a job now, ring 426867 and speak to Alexander. He will take the details.”

“Thank you.”

The stranger hung up.

*page_next
You glance at your watch it is nearly dark. Only a few more minutes left to wait.
While you wait I guess we should explain a few things.

You are special. One of the few people who know the truth, that monsters exist.
In fact you don’t just know they exist you actually track them and destroy them.

Knowing monsters exist, do you believe in a God?"
*choice
#Of course. Evil cannot exist without good.
*set faith +1
*goto zombie

#No, how can God stand by while monsters kill innocent people.
*goto zombie

*label zombie
The moonlight catches you by surprise, you must have spaced out. You just have enough time to grab your bag just as a hand bursts from the ground.
*page_break
The hand reaches for the sky, its nails torn and bloody. It takes the man a few minutes to fully drag itself out of his grave.
You are looking at a zombie, you glance it the headstone.

Here lies Gawain Dumont. Born 1820 Died 1845. He died in battle protecting this land. A hero will will always remember.

“Forgive me Gawain, but I must put you to rest now.”

The zombie just stares at you, then it staggers toward you…
*page_next
Zombies are definately the easiest of the monsters you hunt. They are normally strongest when they are first revived
slowly getting weaker the longer they exist. However the older zombies are an exception, as they are rotted away already.
The magic that revives the body restories them to how they used to be. The ancient zombies could become Zombie Lords who regained their intelligence.
Killing a zombie requires destroying their brain, however some hunters have learnt to use supernatural energies.
*choice
#I’ll use my machete to cut its head off.
*set physical +1
*goto fight

#I’ll use a gun.
*set skill +1
*goto fight

#I prefer to use a spell, if I get the chance I would like to break the magic that has revived the body.
*set mental +1
*goto fight

*label fight
The zombie is near enough now for the stench to reach your nose. It almost overwhelms you and you have to stop yourself retching.


#2

Maybe I’m being dense, but what does it mean by

*choice
*input_text

It doesn’t reference any choice and it doesn’t even reference a variable to input to. Is this how it’s supposed to be?


#3

it was meant to let the player enter a name. I’ve missed out the name bit. thanks for pointing that out. thats sorted the one issue. now getting an error on line 296.

Gonna go back to the start and go through it line by line

EDIT: sorted the issue out found a couple it seems to be working now :slight_smile:


#4

No problem, glad to help. I was booting up your code but found this kind of initial problem, so I thought “maybe there are some simple solutions”. Glad you were able to figure the rest of the problems out too! Good luck! :slight_smile:


#5

thank you


#6

The line number actually refers to the scene.js document (which processes your code behind the scenes). Open it in a text editor that can show line numbers, and scroll to line 296. You’ll see an error message in the code that will help you figure out where you went wrong. Helped me out many a time. You also seem to be using a different version of scene.js than I am, have you downloaded the most recent version (it allows you to insert pictures)?

I’m not sure ruining suit vs. shoes is a good gender distinction, as women have worn suits for decades now, and I am übermanly but hate to soak a good pair of leather shoes.

Also, moonlight is soft and subtle, it usually takes something more sudden to surprise someone. Once they startled back to reality, they could see the moonlight and realize it was later than they’d thought.

And one final suggestion – the existence of God question seems a bit simplistic, you might expand it (without making the stats more complicated). People might believe the monsters are his judgment (I reject that good and evil are co-dependent). And most hardcore atheists would scoff at “God couldn’t let this happen” – if he doesn’t exist, he doesn’t figure into their argument at all.

Sorry if you weren’t exactly looking for feedback this early in the game.


#7

No need to apologise, Feedback is always important :slight_smile: