I didn't burn my game, just rewrote the part

I’m so damn close to releasing so of course I have a wild, unsolvable issue. My quick test keeps telling me I have an illegal indent. Easy fix right? No, this is Ara we are talking about and nothing that happens to her is normal or easy. It is telling me i have an indent of 8 when i should be four. Get this, the line doesnt have any indents at all? The odd thing is that it is the same as the first 100+ lines of code except the first line, which is’t even the problem.

If anyone wants to brave this code feel free. It is rather long though.

*label nowarn
You don't say anything, but the blue eyed man already seems to know.

He shifts his sword up in the sheathe, revealing an few inches of the gleaming metal. The axe clangs off the metal, sending the slaver stumbling back in surprise. He blue eyed man whips around, drawing the sword off his back in a wide arc. The blade arches toward the sky, metal humming in a song of death. There is no resistance as the blade passes through flesh. Just the sound of a sickening crunch. The slaver's head falls from his body. 

It hits the ground with a thud. The silence that follows in deafening. Every eye is trained on the blue eyed man. Blood flows down the shining metal, dropping down onto his arm. He stands straight, bringing the sword to rest on his shoulder. He looks down at the slaver's body and scowls. He hoists  the sword off his shoulder and slides it into the sheathe. He turns to the auctioneer.

"Your money will come via my normal means," he says.

"Y-yes General."

The auctioneer cuts your bindings, letting you fall forward to your knees. The blue eyed man wastes no time. He hoists you to your feet and drags you through the crowd. You struggle against his iron grip, but months of being bound in a ship has robbed you of your strength. 

You stumble through the outskirts of the large village. You pass moss clad hovels and mangy dogs. People ogle you as you as dragged by. Children point and laugh, some throw stones. They are all silenced with a stern look from the blue eyed man. Women stare as they hang out the wash, the men warily handling their weapons. 

"Eyes forward," the blue eyed man growls.

Your face grows hot, with embarrassment or anger you cannot tell. You try to stop him, planting your feet into the ground. He notices your resistance with a grunt. His next shove has you falling face first into the dirt. Your hands and knees scrape painfully against its rocky surface. You look up at him biting out an angry sentence.
*choice
 #"Screw. Off."
  "Screw off already," you snap out.
  You are dragged to your feet, hot breath in your ear. "Watch your tone," 
  the voice that it belongs to says.

  The blue eyed man pulls away, letting you fall again. You hit the ground  
  with a yelp. The man rolls his eyes slightly and offers out a hand to
  hoist you up. You squint it.
  *choice  
   #Get up on your own.
    You ignore his hand, pushing yourself to your feet. His hand drops to 
    his side, and he shrugs indifferently. You look at each other awkwardly 
    before he sticks out his hand for a shake. This time you grab it out of 
    impulse.

   
    "Erland," he says.

   
    "${name}," you reply.

   
    Erland turns and motions for you to follow. You dust yourself off 
    before taking large strides to catch up with him. As you pull up beside 
    him he looks at you out of the corner of his eye.

   
    You walk through the outskirts of the village for about half the day. 
    Erland points out things you should do. Like stand slightly behind him. 
    As he explains you turn the corner, and stop dead in your tracks. Next 
    to the closest hovel is a pen filled with shivering, emaciated people. 
    They barely have scraps of fur to cover them. You see they work 
    tirelessly over crops, a grim overseer watching over them. He holds a 
    whip, stained dark brown at the tip.

   
    You turn away, stomach rolling with anxiety. Is this what awaits you? 
    Is this all a facade? You stare at the ground, brow furrowed. You feel 
    Erland place his hand on your shoulder. You flinch away, lifting your 
    head to look at him. He is looking with a scowl at the pen. His other 
    hand goes to the small of your back, leading you away.

    
    He shakes his sadly. You walk in a heavy silence for the next few 
    minutes before he says," I don't understand that."

   
    You turn your head to look at him.

    
    "What?"

    
    He rubs at the back of his neck again, mouth fashioned in a frown.

    
    "Why treat them badly when they would work better if they were treated 
    well?" He admits.
    *goto_scene questions


thats just a snippet. I’ve checked along down the line, and my indents are not out of place. Nothing is over 4. But every time i save and do the quick test it comes up with the same line and same error. At this point idk what I am doing wrong or what it going on. I’m going to murder a puppy tbh.

1 Like

Double check that everything is saved properly.
Double check the scene file and line that it’s pointing to.
Double check your spacing.

You’re likely going to have to share more of the file if you want someone else to comb through it and check for the mistakes though.

1 Like

I’ve checked that line, deleted that line, deleted the lines around it and saved it, but it still persists. I’m just going to deleted and retype it all. It seems that is the only answer at this point.

feel free to comb through, but this is me we are talking bout so only the most time consuming way is going to work so, best to nip it in the bud.

Is that the actual spacing for indentation you’re using? Just single spaces?

Also I wouldn’t delete everything. I would instead just remove the indents and insert them again.

Are you using a text editor with syntax highlighting for choicescript?

yes, but it is okay I am a speed demon at writing and re wrote everything(the exact same way might I add) and it passed the quick test finally and the random test. So, crisis averted.

Also why? is there something wrong with that indentation system?

Alas I am not using the syntax as it makes zero sense to me, just me and my lil ol’ mac txt edit

1 Like

Just using single spaces seems like it’d be more prone to gain errors. And also far more difficult to quickly glance at your work and be able to see errors in indentation.

Generally speaking, most ChoiceScript authors use 2 spaces per level, while some find it easier to always get their indentation right if they use 4 or more.
Indentation | ChoiceScript Wiki | Fandom

I use four. Or tabs. And I generally use a lot of gotos instead of lots of indents.

With a text editor and choicescript syntax highlighting configured on that should also help catch errors which is why I mentioned it…

2 Likes

Thanks, I’ll read through that and see what I can do before my second monthly update.

I copy-pasted your example code into my own text editor, and I noticed something I would not have assumed could be a problem, but I can’t entirely dismiss, either.

Specifically, some of the blank lines in between paragraphs after the second *choice are not indented at all, some are indented three spaces while others are indented four spaces. The paragraphs themselves are indented four spaces in that part of the code.

I know I personally have run code with blank lines that are not indented, and blank lines indented the same amount as my paragraphs, and have never had a problem. I believe I’ve even mixed those two by accident, again without problems.

However, I’ve never tried to run code where the blank lines were indented a different amount from the paragraphs around them. As I said before, I wouldn’t expect that to cause a problem, but since you ARE having a problem… Maybe try making sure every single one of the blank lines carries the exact same indentation, then re-run the code?

2 Likes

Maybe you can tell us which part is the error based on the error report.

And for the snippet itself, I found nothing unusual or wrong with it. But FYI, indentation error, especially when it’s around *choice command, is mostly not because of indentation error itself.

It mostly a “fall out” choice error, although it doesn’t rule out the possibility of an indentation error.

@Arasia_Valentia Not sure if you ever got this working, but just in case you didn’t, does this work for you?

*label nowarn
You don't say anything, but the blue eyed man already seems to know.

He shifts his sword up in the sheathe, revealing an few inches of the gleaming metal. The axe clangs off the metal, sending the slaver stumbling back in surprise. He blue eyed man whips around, drawing the sword off his back in a wide arc. The blade arches toward the sky, metal humming in a song of death. There is no resistance as the blade passes through flesh. Just the sound of a sickening crunch. The slaver's head falls from his body. 

It hits the ground with a thud. The silence that follows in deafening. Every eye is trained on the blue eyed man. Blood flows down the shining metal, dropping down onto his arm. He stands straight, bringing the sword to rest on his shoulder. He looks down at the slaver's body and scowls. He hoists  the sword off his shoulder and slides it into the sheathe. He turns to the auctioneer.

"Your money will come via my normal means," he says.

"Y-yes General."

The auctioneer cuts your bindings, letting you fall forward to your knees. The blue eyed man wastes no time. He hoists you to your feet and drags you through the crowd. You struggle against his iron grip, but months of being bound in a ship has robbed you of your strength. 

You stumble through the outskirts of the large village. You pass moss clad hovels and mangy dogs. People ogle you as you as dragged by. Children point and laugh, some throw stones. They are all silenced with a stern look from the blue eyed man. Women stare as they hang out the wash, the men warily handling their weapons. 

"Eyes forward," the blue eyed man growls.

Your face grows hot, with embarrassment or anger you cannot tell. You try to stop him, planting your feet into the ground. He notices your resistance with a grunt. His next shove has you falling face first into the dirt. Your hands and knees scrape painfully against its rocky surface. You look up at him biting out an angry sentence.
*choice
 #"Screw. Off."
  "Screw off already," you snap out.
  You are dragged to your feet, hot breath in your ear. "Watch your tone," the voice that it belongs to says.

  The blue eyed man pulls away, letting you fall again. You hit the ground with a yelp. The man rolls his eyes slightly and offers out a hand to hoist you up. You squint it.
  *choice  
   #Get up on your own.
    You ignore his hand, pushing yourself to your feet. His hand drops to his side, and he shrugs indifferently. You look at each other awkwardly before he sticks out his hand for a shake. This time you grab it out of impulse.

   
    "Erland," he says.

   
    "${name}," you reply.

   
    Erland turns and motions for you to follow. You dust yourself off before taking large strides to catch up with him. As you pull up beside him he looks at you out of the corner of his eye.

   
    You walk through the outskirts of the village for about half the day. Erland points out things you should do. Like stand slightly behind him. As he explains you turn the corner, and stop dead in your tracks. Next to the closest hovel is a pen filled with shivering, emaciated people. They barely have scraps of fur to cover them. You see they work tirelessly over crops, a grim overseer watching over them. He holds a whip, stained dark brown at the tip.

   
    You turn away, stomach rolling with anxiety. Is this what awaits you? Is this all a facade? You stare at the ground, brow furrowed. You feel Erland place his hand on your shoulder. You flinch away, lifting your head to look at him. He is looking with a scowl at the pen. His other hand goes to the small of your back, leading you away.

    
    He shakes his sadly. You walk in a heavy silence for the next few minutes before he says," I don't understand that."

   
    You turn your head to look at him.

    
    "What?"

    
    He rubs at the back of his neck again, mouth fashioned in a frown.

    
    "Why treat them badly when they would work better if they were treated well?" He admits.
    *goto_scene questions