Bogus Error. What do I do?!

Inform 7 is reporting the following error for me:

#####Problem. In the sentence ‘if bedTurn is less than 4 begin’#####

The problem is that this sentence DOES NOT EXIST in my code–not with the word “begin” at the end. I have no idea where Inform is getting this stuff. I’ve quit the program, restarted… it’s still reporting the same baloney. The scary part is that I wasn’t working in this part of the project at the time the trouble started. How do I compile when I can’t fix this non-existent error?!
–Jay

The word “begin” is there because Inform converts the “indent-block” style to “begin-end-block” style internally before compiling and the error messages pick the text from that intermedial version. In other words the error message is valid, just ignore the extra “begin”.

(If you post the if-block and the full error message, people can suggest how to fix the error.)

I solved the problem this morning:

Turns out it wanted the definition of bedTurn to appear before the conditional… I must have moved it last night. I thought Inform’s compiler didn’t care about the order of appearance for stuff like this. Oh well…

It tries not to, but in some cases the order does matter.

That’s odd. The order of a variable and its usage doesn’t seem to matter to me. Though admittedly I only wrote up a quick example to test it; your game is probably far more complex.

It’s good that you’ve got it working in any case. Inform 7 is pretty flexible about the order of which the code appears for the most part. There are a few things exceptions, though. A new kind definition is something that does need to appear earlier than its child objects.

I think the biggest problem I have with Inform is that its error reporting is SO specific that it often misses the big picture. I spend half my time playing with semi-colons when the real issue is that I’m just messing around where Inform doesn’t really want me, like in the area of Implicit Taking or whatever. The idea that the error reporting is based on a version of my programming that I never actually see just makes me sigh–I’m playing the game of Telephone with my own code! If Inform weren’t so freaking great it would SUCK!

Isn’t that true for everything?

I looked but couldn’t find a bug for the badly written error messages, so I reported it.