Inform reporting error in it's own documentation

I’m getting an error when trying to test my game. shows this image:

When I check the Console, it shows it’s reading the error in the Rules documentation:

I can’t do any testing until I figure out how to fix this. Any suggestions? I’ve tried restarting the app and my computer already.

My guess is there’s something in your code that’s conflicting with the Standard Rules, which causes that error. Do you give any special meanings to the words “closed”, “container”, or “cage” in your source?

What might fix this (hard to tell without seeing code) is to get rid of the “(called the cage)” part. Do you need that? Is “if the actor is in a closed container” good enough?

The only reference to a container I make is a metal chest that is closed.

I use the following code:

Inside House is a metal chest
The metal chest is an openable closed container.
Inside Metal Chest is Ornate Ring. Ornate Ring is Undescribed.

It’s not referencing my code, I don’t use that code at all, i only use basic english statements to make everything because that’s what easiest for me to understand

What you’re writing IS code. It’s just that Inform’s neat trick is to allow you to do it in plain English-- but it’s still code. It really would be much easier to help if you posted the whole bit of it that Inform is whining about. That little orange arrow after “Problem” will highlight it for you. But I suspect that simply removing “(called the cage)” will fix it. If there’s a reason you need to specify what it’s called, there are ways around that.

It looks like Inform is in fact complaining about part of the Standard Rules—this is from the implementation of the exiting action.

Check an actor exiting (this is the can't exit closed containers rule):
    if the actor is in a closed container (called the cage):
        if the player is the actor:
            say "You can't get out of the closed [cage]." (A);
        stop the action.

Which makes me think that something has made it confused about the meaning of one of the relevant words.

No it references the standard rules when I click that, not my code at all, that’s my problem. It’s saying there’s a problem with the standard rules

I don’t know what could be causing that. I only use North South East and West as my exits, nothing fancy. And I don’t have the player stuck in anything, just starts a room and then moves room to room with a blurb of what they saw along the way

Please comment out all your code – surround the whole thing in brackets – and add

Lab is a room.

outside the brackets and try compiling.

No problems compiling. It’s gotta be something with my code then, I guess i’ll go through room by room until I figure it out

A quick hunch and I found out it has something to do with this line:

Inside House is a metal chest
The metal chest is an openable closed container.

My instinct is the same as Daniel’s, that it’s likely you’ve used one or more of:

  • actor
  • closed
  • container
  • cage

in an object or variable name or phrase definition in a way that’s making the compiler misinterpret that line in the Standard Rules.

Try

Use unabbreviated object names.

which forces you to spell out your objects’ full names every time. That often helps resolve problems where you’ve written code that you think refers to one thing but it really refers to another because the same word is a part of more than one object name.

oh, yes. You need a period at the end of Inside House is a metal chest or a blank line after it. I7 is interpreting that as

Inside House is a metal chest the metal chest is an openable closed container.

and the two separate is’s is driving it nuts.

3 Likes

That fixed it, thank you so so so so much!

1 Like