My coding questions

Now I’m getting “It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.” Could it be my indents? Doesn’t it usually say when its the indents?


  *if Brains > 2
    xxxxxxxxxx.
    *goto bas_relief
    That's odd, xxxxxxxxxxx.
    *goto bas_relief

Yeah it’s your indents. I think. Or well do your indents look like this?

No! I wasn’t saying remove your else. I was just saying to Proff that elses and elseifs aren’t needed in general. In your case you do need them for what you’re trying to code. You could replace the else with a *if brains < 3 though


*label examine

*if Brains > 2
	In particular, you notice xxxxxxxxx.

*label bas_relief

*choice
	*hide_reuse #xxxxxxxxxxxxxxx.
		xxxxxxxxxxx.
		*goto bas_relief

	*hide_reuse #xxxxxxxxxxxxxxx?
		xxxxxxxxxxx.
		*goto bas_relief

	*hide_reuse #xxxxxxxxx?
		xxxxxxxxxxxxx.
		*goto bas_relief

	*hide_reuse #xxxxxxxxxxxx.
		*goto bas_relief
	*hide_reuse #xxxxxxxxxxxx?
		*if Brains > 2
			xxxxxxxxxxx.
			*goto bas_relief
		*else
			That's odd, xxxxx.
			*goto bas_relief
	#Nah, I'm done here.
		*goto arena_entrance 


*else definitely seems simpler than a 2nd *if statement. But yes, this did it!! CS is a Fabulous/Fabulich system, but dang those indents take some getting used to!

Thank you @FairyGodfeather, you nailed it!

Using *elseif and *else makes it easier to find errors through quicktest and randomtest, I believe. Of course, if you don’t use those debugging tools, it doesn’t matter.

Yeah I don’t use those tools. I test every single section as I write it to ensure it works.

Also i achieve made work quick test in a mobile. But not random test how works random test offline. Also Dan Fabulous thanks for create a system who let me code in a phone with null information code skills . Now if you could make me learn write better in English you are a god lol

*if without *else/if doesn’t need a *goto to fall out of the nest, so it’s kind of useful for when you don’t have a complex condition check in place. I use it a lot to throw in additional lines in between the narrative. I don’t think it’s bad practice either, just that different circumstances call for different measures.

I want to allow an extra fake_choice if a certain condition is met. Instead, I’m getting all 3 choices no matter what…

*fake_choice
  #Choice 1!
  #Choice 2!
    *if Brains > 2
    #Extra Choice.

…help?

[EDIT] Figured it out myself! I’m getting there!!

*fake_choice
  #Choice 1!
  #Choice 2!
    *if Brains > 2
      #Extra Choice.

Turns out I was wrong, this is it…


*fake_choice
  #Choice 1!
  #Choice 2!
  *if Brains > 2
    #Extra Choice.

*fake_choice
----#choice
----#choice a
----*selectable_if (Brains >2) #Extra choice

Works i use something similar in my game

I like that better! Less indents to remember! :smiley:

Thank you MJ!

Poison assassin to the rescue ! i hope it helps!

Oh, wait a minute…that still shows the option, but has it unchoosable. I don’t want to let players know when I have a hidden option unless they’ve earned it. Oh well, at least I still know how to hide it.

I think a simple *if hides the option

yeah Aquila has reason i prefer people saw there are more options two other replays except if the choice is too spoiler

For this one choice, it would be a little bit of a spoiler. But at least I know 2 different ways to do it now. :slight_smile:

I tend to use *if, if there are abundant choices or if it is onky pertainable to certain class or playstyle. Like more nefarious or chilverious styles character options showing up if a player stays true to their character.

When I run quicktest.html, I’m getting “Expected choice body” down at the bottom…

*page_break So, where to?
*choice
  *if race = "Dwarf"
    #Maybe one last stroll around my homeland of Klagsdale.
    *goto_scene Klagsdale
  *if race = "Elf"
    #Maybe one last stroll around my homeland of Sylvan Lakes.
    *goto_scene Sylvan_Lakes
  *if race = "Halfling"
    #Maybe one last stroll around my homeland of Smallwood.
    *goto_scene Smallwood
  *if race = "Gnome"
    #Maybe one last stroll around my homeland of Pingus.
    *goto_scene Pingus
  *if race = "Human"
    #Maybe one last stroll around my homeland of Gosch & Dubbel.
    *goto_scene Gosch
  #Maybe I'd rather go someplace else.  What are all my current options?
    *choice
      #Visit the Dwarves of Klagsdale
      *goto_scene Klagsdale
      #Visit the Elves of Sylvan Lakes
      *goto_scene Sylvan_Lakes
      #Visit the Halflings of Smallwood
      *goto_scene Smallwood
      #Visit the Gnomes of Pingus
      *goto_scene Pingus
      #Visit the Humans of Gosch and Dubbel
      *goto_scene Gosch
      #I'll go wherever my travels take me.
      *page_break And away we go!
You pack a few necessities, say goodbye to your loved ones, and head out of the safety of your home village for the first time ever.

…for the line that starts “You pack a few necessities…”

Help?

How can you look at code for a game?

@vampierkid222 I don’t know what you mean. This is a game I’m writing & while playtesting it, I got an error message.