What is wrong with this code?

I uploaded my .txt files to DashingDon and when I tried to play test, it gave me an invalid indent error. This is the code.

You wonder out loud again, "What is my name?"

*input_text name

*page_break

*label nam

"So my name is $!{name}?"

*choice

  #Yes, of course. I know my name. 

    *set name "$!{name}"

It was working in CSIDE and CSIDE Legacy but on DashingDon it is not working.

What is wrong here?

1 Like

What are the “ ”? They seem to be the problem, so I removed them. I wonder if it could be file encoding (utf-8, etc.) issue? So that either the tab or the space or some other formatting symbol saved in the text file is interpreted as  by the default encoding on dashingdon.

You wonder out loud again, "What is my name?"

*input_text name

*page_break

*label nam
"So my name is $!{name}?"

*choice
  #Yes, of course. I know my name.
    *set name "$!{name}"
3 Likes

What is what my original code looked like but DashingDon changed it into this.

Assuming it isn’t the "Â"s that are messing with the code, are you positive that the error is in the section you’ve posted? Could it not be with the #option below “Yes, of course. I know my name.”?

I checked the indentations on that too. They are in order. If there was a problem it should have appeared in the CSIDE too.

Do you mean that it passed quicktest with no problems?

I didn’t do a quicktest but it executed without a problem.

Would you mind pm’ing me a link to your game on dashingdon? I’d like to take a look under the hood

Please don’t develop in this, it’s completely unsupported.

1 Like

Unfortunately, it is the only tool available to me at the moment. CSIDE doesn’t co-operates with me when I edit code in it.

Ok, so I admit I don’t understand how to code in your setup where the extra end-of-line symbol/space doesn’t get appended at the end of some of the lines, which is then interpreted as  by the default encoding on dashingdon. It seems like we can’t even see it when it’s appended. The massive amount of blank line is what’s worrying me about what’s really going on with the editor’s automated formatting (or whatever is happening :man_shrugging:).

Currently I’m only able to work around this problem by opening the text file in another text editor (notepad should be fine?), Replace all  with nothing (as in, not even a blank space), save the text file again, then upload to dashingdon. It then wouldn’t show the  in the text file, and at least it runs the name input part without throwing error about indent anymore.

1 Like

Hello everyone!
My problem has finally been resolved thanks to @sviyagin.

The problem was that I was stacking choices upon choices.
After I redesigned the intro.txt DashingDon executed it perfectly.

Edit: Stacking choices was not the actual problem.

I copied my txt file into Google docs to check for grammar and spelling mistakes and thus converted it into a .docx file which I reconverted into .txt file and it somehow messed with something which stopped the code running on DashingDon (also explains why it worked on CSIDE but not on DashingDon)

Hopefully, this will be of some help to someone reading this in future.

3 Likes

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