I’m trying to revise old code I wrote a while ago. I think I should mention I sent it over a server dropbox, and also a zipped email because I didn’t have my usb.
Up to the first choice, I get an *Invalid indent error for line 111, expected # was goto. There is nothing on 111, it’s space to organize the code. There aren’t even spacebars in it.
I deleted the section of code and replaced it, but the error persists. I cannot see what is wrong that blocks the first choice. In fact, the error is said to be located far from the first choice; over a couple of them actually.
#$18
*goto 1
(here is line 111)
`
`
`
`
*label 4
knfefefe
*finish
You need to cut and paste the code in preformatted text so that the indentations show up correctly, as @Elfmonkey did. That’ll make it easier to see what the problem is. It sounds like you forgot to include an #option after a choice, and instead put a *goto at that level of indentation. The error message about line 111 is simply where that flaw manifests; it’s not where the mistake is made in the first place. (Like realizing at the movie theater that you left your tickets at home - you made the mistake at home, not at the theater, even though it’s at the theater that you realized it.)
This could be the forum re-formatting text (I’ve had that happen trying to copy-paste properly spaced text.) However, if that is how it’s spaced, try using at least two spaces for any given indent.
What’s up with ’ after #27? Is that the Choicescript equivalent of a blank line? I don’t use those in my code and only use a double carriage return (like between #$10 and #$27) if I actually want to put a paragraph break in some text… this may be why I can’t see any other errors.
I see that when I make a * or #, I’d only need to set the executing code after 1 indent, or more specifically a space. I don’t use [tab], I use [Space].
Anyway, the ` is to help indicate both when coding and personally testing the program that the choice is the correct solution. It is only reading text resulting from the choice.
That could also be - did you write this in a text-only program, or a word processing program? I got all kinds of weird errors when I tried to paste code from MS-Word and then find-and-replace the broken symbols; it worked all right when I deleted and put back in all of the carriage returns, but whenever I missed one my code invisibly broke again.
I usually first write in MSW, but this was created in Notepad.
There’s this weird thing where I seem to find invisible carriage returns, like there are two on the same line. I think they could cause problems in the code.