Multiple *choice error


#1

Hello guys! I am new to this forum and am a very enthusiastic about writing a game. I have got very much ides of plot, but the codding is the real problem for me. I am used to programming with C# but i can’t get this language. Please help me with this code. It gives me
"meeting line 4: increasing indent not allowed, expected 2 was 4"
Thanks for the time ! I am looking forward to working with you guys ! :slight_smile:
P.S The goto is working fine.

*choice
#You go to check what is making the sound.
You see a:
*choice
#A wounded girl lying on the floor.
She tells you that her name is:
*choice
#Joanna
My name is Joanna. Please help me. I am being chased Lord Geoff’s mercenaries.
*finish
#Caitlyn
My name is Caitlyn. Please help me. I am being chased Lord Geoff’s mercenaries.
*finish
#Miriam
My name is Miriam. Please help me. I am being chased Lord Geoff’s mercenaries.
*finish
#Mia
My name is Mia. Please help me. I am being chased by Lord Geoff’s mercenaries.
*finish
#I don’t like any of those names.
*input_text CharA
My name is {CharA}. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #A wounded boy lying on the floor. He tells you that his name is: *choice #John My name is John. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #Philip My name is Philip. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #Bob My name is Bob. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #Robert My name is Robert. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #I don't like any of those names. *input_text CharA My name is {CharA}. Please help me. I am being chased by Lord Geoff’s mercenaries.
*finish
#You stay in the room and hide in the wardrobe.
You choose the safety and decided to stay in the room.
*goto_scene who




#2

*choice #You go to check what is making the sound. You see a: *choice #A wounded girl lying on the floor. She tells you that her name is: *choice #Joanna My name is Joanna. Please help me. I am being chased Lord Geoff's mercenaries. *finish #Caitlyn My name is Caitlyn. Please help me. I am being chased Lord Geoff's mercenaries. *finish #Miriam My name is Miriam. Please help me. I am being chased Lord Geoff's mercenaries. *finish #Mia My name is Mia. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #I don't like any of those names. *input_text CharA My name is ${CharA}. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #A wounded boy lying on the floor. He tells you that his name is: *choice #John My name is John. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #Philip My name is Philip. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #Bob My name is Bob. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #Robert My name is Robert. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #I don't like any of those names. *input_text CharA My name is ${CharA}. Please help me. I am being chased by Lord Geoff's mercenaries. *finish #You stay in the room and hide in the wardrobe. You choose the safety and decided to stay in the room. *goto_scene who

Mh, try it out like this?


#3

Thanks for the fast reply, but the code is not working in the way you redid it.
My basic idea will be lost if the code works out like this.
Thanks for the fast reply :slight_smile:


#4

Ohh I just see what you mean x.x
Silly me. Give me a moment x)
EDIT: Fixed, I hope :smiley:


#5

Thanks it worked! :slight_smile:


#6

Glad that I could be of help :slight_smile:


#7

@Wraith Kudos for retyping and fixing all that o.o
@aaster23 Glad you got your code figured out and welcome to the forums!

Just some advice. When posting your code on the forum for help type < pre> Your Code Goes Here < /pre>
Without the spaces. That way we can help you more easily.

Secondly, for that scene. Rather than having to retype all that, it might be easier to simply
*create chara “”

  • The above is in regards to a recommendation of creating all variables as lowercase.

*set chara “Mia”

  • The above would go right after the choice. The name in the quotations would be whatever the MC just chose to name the character.

I would recommend simply putting *goto something right after so you don’t have to keep repeating the line where the character says there name. You can then just put a single line e.g.


 
*choice 
  #Jim 
    *set chara "Jim" 
    *goto named
  #Lisa 
    *set chara "Lisa"
    *goto named 
  #I'll write it...
    *input_text chara 
    *goto named 

*label named 
My name is ${chara}....

Saves you time, code, and effort.


#8

xD
I just copy and pasted it onto Notepad++, did the indention, and then posted it here with

[code] [ /code]
So not much work at all.


#9

Ha, swift and efficient all the same, you’re not getting away from my compliment that easily you :wink:


#10

Thank you really much!
By the way today I had some free time and tried to code again. This time i have a problem with the labels.
I name a label “name” and another label “wep”.
When i use *goto name and *goto wep i get a “bad label name”.
The wep.txt and name.txt have codes in them.
Here is my code.

*Author Go6eca
*scene_list
  name
  wep

*create Bow 0
*create Dagger 0
*create Sword 0
*create Magic 0

You are awoken by the chrashing sounds.
The tremoring murmur is spreading across your own little house.
The house you built using your own hands.
But who is downstairs?
*choice
 #You reach out for your weapon.
  *goto wep
 #You ask who is down.
  But who are you actually?
  *goto name
 #You call for the guards.
  You hear a voice from downstairs. But what voice do you hear? Is it a boy or a girl?
  *goto name

Once again thanks for the help :slight_smile:


#11

What you did are scenes, not labels.

For example, you have a scene named 'Scene_1’
Those are always listed under the scene-list in the startup.txt.
To get to that scene, you need to use the command
*goto_scene Scene_1

If you have a label (a command that allows you to jump around inside a scene), you can use the following. (I named the label Label_1
*goto Label_1
To name a label, you need to go to the desired place you want your story to continue, and then use this command.
*label Label_1

If you come from another scene, and want to go to a specific part in another scene, you can use the following.
*goto_scene Scene_1 Label_1


#12

Do i have to “*create chara” at the begining?
How do i make the chara have % or score ?
How do i hide the chara if he/she is not discovered yet?
Can you tell me some more tips and tricks?
And one more stupid question how much scenes does a 50K game has?
Thanks once again :slight_smile:

*choice 
  #Jim 
    *set chara "Jim" 
    *goto named
  #Lisa 
    *set chara "Lisa"
    *goto named 
  #I'll write it...
    *input_text chara 
    *goto named 

*label named 
My name is ${chara}....

#13

Okay ~ I may not be @Arcania, but I guess I can help with that x)
(I have nothing better to do for at least an hour, sooo…)

If you want to use her (I just assume she’s female) example above, you need to create

at the beginning of your startup.txt.
Once you get to the point to name the character, you just use

[code]*choice
#Jim
*set chara “Jim”
*goto named
#Lisa
*set chara “Lisa”
*goto named
#I’ll write it…
*input_text chara
*goto named

*label named
My name is {chara}....[/code] Just like she said above. "_{chara}_" will then show the name you selected.

That’s easy. Create another variable, this time with a number instead of letters=

Now, when you want to in- or decrease the amount of numbers, just write

There are two possibilities.

  1. you create yet another variable, and name it, for example:

Once you’ve met that character, you can

In you choicescript.txt, you can now add the following

*if (Met_Character = true) *stat_chart percent Chara2 ${chara}

Another possibility would be the following:
In you choicescript.txt, you can add the following

*if (Chara != "") *stat_chart percent Chara2 ${chara}
As long as you have nothing added inside the “” of Chara, then the relationship will not show up in the stat screen.

I could try to, just ask what you would like to know x)

It depends on the author of the game.
My games usually have lots and lots of scenes, but I like to write a lot. So, it might be that not much happen, but the scenes is more detailed than others. Then again, other people like to not be too detailed and focus more on the story itself, thus it goes through faster.
My game FAWR for example has over 100k words if I am not mistaken, but only like 3 scenes in total so far.

So, it all depends on how much you write in each scene.


#14

Thanks for the help once again. I have another question for you :smiley:
I have a value merc1 = “True” if you make one of the choices.
After that i want to use merc1 = “True” as
*if (merc1 = “True”)
*goto_scene elswhere
*else
*goto_scene somewhere
But the code does not work and gives me this little error
"meeting line 15: invalid indent, expected at least one line in ‘if’ true block".
I don’t know the right IF form in this language .
Thanks for the help once again :slight_smile:


#15

Quite easy, actually :slight_smile:
If you use an if command, you need to do it like this.

*if (merc1 = "True") *goto_scene elswhere *else *goto_scene somewhere

Btw, if you use True/False variables, you can drop the “”, as they are unnecessary :wink:


#16

Thanks for the fast response. I decided that i will go with

*if (merc1 = 1)
  *goto_scene elswhere
*else
  *goto_scene somewhere

But now i have another problem with declaring that merc1 equals 1.
“meeting line 112: Invalid expression at char 7, expected NUMBER, STRING, VAR or PARENTHETICAL, was: EQUALITY [=” that’s the error i get
The code is like this:

 #You start yelling at them for breaking in your house.
         *set merc1 = 1
          You hear an angry voice coming towards you

#17

If you use the set command, you can drop the “=”. It’s redundant here :slight_smile:


#18

I declared the "*create merc1 0"
Same error.


#19

I am currently confused as to what you are trying to do…
Anyway.

#You start yelling at them for breaking in your house. *set merc1 1 You hear an angry voice coming towards you.
This should suffice.
What are you trying with the create suddenly? YOu can use *create only in the startup file, and from what it looks like it looks perfectly fine to me, unless you tried to include it somewhere else…?


#20

Thanks Wraith and i know that i can create only in the startup :slight_smile: That’s where i create!
It worked :slight_smile: Serious thanks to you!