I'm having trouble with "..." and the error I'm getting is "..."

I’m having trouble with…

The error I’m getting is:…

My code looks like this:

Example
*commend
    Indent
```So. I am running through my WIP, but right now, only 2 of the 5 choices are shohwing, and I am unsure why. Checked through, and can't find anything wrong. Going to put up the 5 choices code, to see if anyone else can find something that I didn't.
Here is the code:

*choice
#"Me. I snap, annoyed.
*set stubborn %+10
*set l_relationship %-3
*set mind %+10
*set sentimental %+10
*set independent %+10
"Me. I snap. Anyway. I know Ash best. She doesn’t know you. She won’t react well if you try to bring her down. I tug on my arm.

	The hand, after a long silance, broken only by the wind, the snowfall, the creaking of the old tree. The blood in my ears. My heartbeat. Lets go. I nod, moveing to the tree, and starting to climb.
	*goto climb
#"Me. I say, pushing my anger down. Anger will not help, here. Despite my desire to get Ash out of that tree so she doesn't fall, and break her neck.
	*set heart %+10
	*set l_relationship %+3
	*set charming %+10
	*set independent %+10
	"Me. I say, pushing my desire to get Ash from the tree, down. For now.
	Look. Ash knows me best. You go up there? She won't react to you well. Probably struggle. She struggles? She falls. She falls? She breaks her neck. I go up there? I get her down. She won't fight me. She knows, me.

	I don't hear anything from ${l_name}, for a long, long time. The silance between us, broken only by the moaning of the wind. Snowfall. Creaking of the old tree. Blood in my ears. My heartbeat.
	"You. ${l_name} says. Make sence. Don't fall, ${mc_first}. I nod, the hand on my arm vanishing, as I move towards the tree, and start climbing.
	*goto climb

#"You. I say, tone cautious. Can climb trees?
*set cautious %+10
*set mind %+10
*set stoic %+10
*set l_relationship %+3
*set sentimental %+10
*set independent %+10
"You. I say. Can climb trees? How well?

	"Better than you. ${l_name} says. More importantly. If I fall? I can survive the fall. You. Can't.

	"Ash. I say, can't. Right now? If you go? She won't react well to someone she doesn't know, grabbing her. If I go? I can get her out of that tree.

	"You hope. ${l_name} says, tone steady. You hope, you can get her out of that tree.

	"Yeah. I say. Just.

	"Go. ${l_name} says, the hand on my arm vanishing. I will wate below. If you start falling? Drop Ash. I will catch her.

	I move towards the tree, and start climbing. Unsure of that last. Suggestion?
	*goto climb
#"You can climb trees? I say, mind raceing, doing rough mental calculations.
	*set mind %+10
	*set pragmatic %+10
	*set l_relationship %+3
	*set stoic %+10
	*set team_player %+10
	"You. I say, mind raceing. Can climb trees? How well?

	"Better. ${l_name} says, than you. Especially with just under 50 kilograms of weight on the way down.
	I consider, waying my options. Then.

	"Go, then. Get her down. I grunt, nodding sharply.

	"I will. ${l_name} says, a hand resting on my shoulder for a second before vanishing, and I hear booted feet clattering against the tree. Faster than anyone I have ever heard. Faster than anyone should be able to go up a vertical surface.
	*goto no_climb
#"How sure are you. I snap.
	*set heart %+10
	*set l_relationship %+3
	*set cautious %+10
	*set pragmatic %+10
	*set team_player %+10
	"How sure are you. I snap. You can get her out unharmed?

	"Do you. ${l_name} says, dryly. Want the percentage? I could tell you, if you want it.

	"Um. I say.

	"I am sure enough. ${l_name} says. I can get her out, better than you can. I won't ask you if you trust me. You don't. That's not a problem, however. It is. Expected, given current events. Given, our conduct.
	"Anyway. Can't you just yell at her I am coming? She has ears. Yes?

	"Yeah. I say. I didn't. Think? ${l_name} says, cutting me off. Understandable in this situation. Now. The hand on my arm vanishes, as I hear feet clattering up the tree. Going faster. A lot faster, than any human should be able to move. Especially on a vertical surface.
	*goto no_climb
Yeah. So. Probably something there that I am missing. Anyway. Hope you all have a good day.
1 Like

HI, how are you? :slight_smile:

I’ve executed your code and found that It shows only 2 out of 5 options due to indentation.

I highly recommend that you use ChoiceScript IDE to help you and auto-indent your scenes, especially a heavy dialog scene like that.

Variables of your code (I had to make a *temp of them to run your code, I’m leaving it here)

*comment -> I've created temp variables to help running this
*comment
*comment --> Number
*temp stubborn 0
*temp l_relationship 0
*temp mind 0
*temp sentimental 0
*temp independent 0
*temp heart 0
*temp charming 0
*temp cautious 0
*temp stoic 0
*temp pragmatic 0
*temp team_player 0


*comment
*comment --> Text
*temp l_name "Player"
*temp mc_first "NPC"

And then, your code correctly indented:

*comment Be Careful with identing
*choice
   #"Me. I snap, annoyed.
       *set stubborn %+10
       *set l_relationship %-3
       *set mind %+10
       *set sentimental %+10
       *set independent %+10
       
       "Me. I snap. Anyway. I know Ash best. She doesn't know you. She won't react well if you try to bring her down. I tug on my arm.
       
       The hand, after a long silence, broken only by the wind, the snowfall, the creaking of the old tree. The blood in my ears. My heartbeat. Lets go. I nod, moving to the tree, and starting to climb.
       
       *goto climb
   #"Me. I say, pushing my anger down. Anger will not help, here. Despite my desire to get Ash out of that tree so she doesn't fall, and break her neck.
       *set heart %+10
       *set l_relationship %+3
       *set charming %+10
       *set independent %+10
       
       "Me. I say, pushing my desire to get Ash from the tree, down. For now.
       
       Look. Ash knows me best. You go up there? She won't react to you well. Probably struggle. She struggles? She falls. She falls? She breaks her neck. I go up there? I get her down. She won't fight me. She knows, me.
       
       I don't hear anything from ${l_name}, for a long, long time. The silence between us, broken only by the moaning of the wind. Snowfall. Creaking of the old tree. Blood in my ears. My heartbeat.
       
       "You. ${l_name} says. Make sense. Don't fall, ${mc_first}. I nod, the hand on my arm vanishing, as I move towards the tree, and start climbing.
       
       *goto climb
    
   #"You. I say, tone cautious. Can climb trees?
        *set cautious %+10
        *set mind %+10
        *set stoic %+10
        *set l_relationship %+3
        *set sentimental %+10
        *set independent %+10
        
        "You. I say. Can climb trees? How well?
        
        "Better than you. ${l_name} says. More importantly. If I fall? I can survive the fall. You. Can't.
        
        "Ash. I say, can't. Right now? If you go? She won't react well to someone she doesn't know, grabbing her. If I go? I can get her out of that tree.
        
        "You hope. ${l_name} says, tone steady. You hope, you can get her out of that tree.
        
        "Yeah. I say. Just.
        
        "Go. ${l_name} says, the hand on my arm vanishing. I will wait below. If you start falling? Drop Ash. I will catch her.
        
        I move towards the tree, and start climbing. Unsure of that last. Suggestion?
        
        *goto climb
    #"You can climb trees? I say, mind racing, doing rough mental calculations.
        *set mind %+10
        *set pragmatic %+10
        *set l_relationship %+3
        *set stoic %+10
        *set team_player %+10
        
        "You. I say, mind racing. Can climb trees? How well?
        
        "Better. ${l_name} says, than you. Especially with just under 50 kilograms of weight on the way down.
        
        I consider, weighting my options. Then.
        
        "Go, then. Get her down. I grunt, nodding sharply.
        
        "I will. ${l_name} says, a hand resting on my shoulder for a second before vanishing, and I hear booted feet clattering against the tree. Faster than anyone I have ever heard. Faster than anyone should be able to go up a vertical surface.
        
        *goto no_climb
    
    #"How sure are you. I snap.
        *set heart %+10
        *set l_relationship %+3
        *set cautious %+10
        *set pragmatic %+10
        *set team_player %+10
        
        "How sure are you. I snap. You can get her out unharmed?
        
        "Do you. ${l_name} says, dryly. Want the percentage? I could tell you, if you want it.
        
        "Um. I say.
        
        "I am sure enough. ${l_name} says. I can get her out, better than you can. I won't ask you if you trust me. You don't. That's not a problem, however. It is. Expected, given current events. Given, our conduct.
        
        "Anyway. Can't you just yell at her I am coming? She has ears. Yes?
        
        "Yeah. I say. I didn't. Think? ${l_name} says, cutting me off. Understandable in this situation. Now. The hand on my arm vanishes, as I hear feet clattering up the tree. Going faster. A lot faster, than any human should be able to move. Especially on a vertical surface.
        
        *goto no_climb


*comment -> Your code doesn't inform the label either, I've created a blank one just for running purposes
*label no_climb
A non informed Text-based Game goes here
1 Like

Unfortunately, cside isn’t accessible to those using screen readers. However the indentation IS indeed the problem.

*choice needs to be in the same indentation as the paragraph proceeding it
#options need to be indented one more than that
Result options (body text, gotos, *sets, etc. need to be indented one line more than that.

If you aren’t using the indent nav addon https://addons.nvda-project.org/addons/indentNav.en.html, you really need to be, same for having line indentation announcements turned on. I know I’ve mentioned both of these before.

This is a paragraph setting the scene. 
*choice
	#option 1
		*set stat1 direction
		*set stat2 direction
		*set stat 3 direction
		This is the body text of option 1. 
		*goto label 1
	#option 2
		*set stat1 direction
		*set stat2 direction
		*set stat3 direction
		This is the body text for option 2. 
		*goto label2
*label1 
label 1 text. This text will be skipped if the goto is to label2
*label 2
Label 2 text. This text will be skipped if the goto is for label1

And if you want to nest choices, 

This is a paragraph setting the scene. 
*choice
	#option 1
		*set stat1 direction
		*set stat2 direction
		*set stat 3 direction
		This is the body text of option 1. It leads to another choice.
		*choice
			#option 2a
				Option 2a text
				*goto label1
			#option 3b
				option 2b text. 
				*goto label2
	#option 2
		*set stat1 direction
		*set stat2 direction
		*set stat3 direction
		This is the body text for option 2. 
		*goto label2
*label1 
label 1 text
*label 2
Label 2 text

Turn on both indent nav and indent announcements and review this thoroughly.

I am willing to sit down with you on a voice app and nvda remote to guide you through this if you wish. This is really fundamental, though. It is imperative that you come to understand this if you ever wish to advance in the language.

If you have a braille display, I highly recommend looking at this using braille to get a better sense of the nesting at work. I understand, though, that braille displays are often prohibitively expensive and that’s not an option open to everyone. But if it is available to you, I highly recommend availing yourself of it.

Will that work with Jaws as well? I use Jaws for screanreader.

Unfortunately, no. Nvda is free however and can be gotten at nvaccess.com. I don’t use jaws, but will do some research into it and get back to you. For this, though, I really do think nvda is going to be your best option.

Thanks for putting in all this effort to assist me.
A bit off-topic, but. Is there a limmit of *elseifs, you can do in a string? I am just finishing the last few touches to my game, well, the part of it I have done, and I keep running into a problem, that when I am running through a particular character arch, the MC choose a char to go with, at the end, it switches to if you choose another char. I put a temp in just to see what happened, on the same lable, and it worked fine. So, unsure of what’s going on. Checked the indentation, everything seems fine there.
I can put the code up if you need that to diagnose.

I don’t think so. I’ve had to use well over 50 for something I was doing once.

At a guess, you either didn’t make the last option an *else, or your *else command is general enough that its triggering even if something else is also true. Or something is wrong in the place where the checked variable is getting set. Such as indentation. It could also be that you have the if blocks indented wrong.

*if’s follow the same rules as *choices. ifs are on the same level as the proceeding body texts, conditions and gotos are indented below that.

This is a paragraph of body text. 
*if var1=1
	show this text
	*goto label1
*elseif var1=2
	Show this text
	*goto label1
*elseif var1=3
	show this text
	*goto label1
*else
	*show this text
	*goto label1

About jaws, press insert f6 to go to the settings center. Press ctrl+shift+d to apply the change to all apps. Type indent in the search field. the first option should be "say indented characters. Check that box and save it. This should let you see indented characters in both your writing app and your web browser when looking at example code.

No problem. I really feel like this is a very viable path for blind and visually impaired writers and gamers, and rarely if ever see people using it. I know its possible, and want to see more games / books by blind / vi folks, especially when you consider that publication is a big possible in to other game/literary opportunities and resume/portfolio building.

Do you happen to know where the insert key would be? Used to know where it was, did a look on the internet, and can’t seem to find the location.
Also. What were you doing that you had to do 50 *ifs? Must have been some interesting codeing.

Its whatever your jaws key is. Whatever the key that you use to do most jaws commands. Try capslock.

It wasn’t interesting just tedious. Basically, I had a *rand that could be from like 1 to 50, and then had to tell the game, if the randroll is 1, set the value to this. If its 2, set it to that, etc etc.

Ewwwww. That, is why never going to do dice roles. Well. That, and I think it kind of takes from the emertion of the game, or games, depending if I start another, but that’s just me.

Yeah, ChoiceScript is decent, but there’s a lot to be desired in terms of coding capabilities.

Fair enough. I personally like them for some things but its definitely personal preference.

Did you get your jaws settings changed?

Unfortunitly, still trying to find that insert key. I have a laptop. Not even sure if I have an insert key. I should? But.
I don’t actually use? Jaws, that much. I usually just turn it on, then do other stuff. Don’t actually play around with jaws that much. Don’t want to break something.

Like I said, it may be your capslock key.

At least in some laptops, insert key is the 0 key of numpad when numlock is off.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the @moderators.