I need help with some syntax

Here is my code:

A flammable container is a kind of container.
Instead of placing a lit thing in a flammable container, say "You are trying to store a lit object in a flammable container, this can't work !".

It gives me an error, I suspect that Inform does not recognize “placing” an item in a container. I tried storing doesn’t work either.
Can anyone help me?

The problem seems to be that you haven’t defined a “Placing it in” action.

This seems to work:

A flammable container is a kind of container.
Instead of inserting a lit thing into a flammable container, say "You are trying to store a lit object in a flammable container, this can't work !".

Also this:

Placing it in is an action applying to two things.

A flammable container is a kind of container.
Instead of placing a lit thing in a flammable container, say "You are trying to store a lit object in a flammable container, this can't work !".
1 Like

I tried both of your fixes, only the first one worked for me. Must have an other line of code that breaks it. Anyhow, thanks a lot the first fix works just fine.

Well, the second one should compile, but for it to actually have any effect, you will also have to add an Understand line that make the parser understand “place” as a command. Something like

Understand "place [thing] in [thing]" as placing it in.

And probably also something that redirects it to the Insert action. That said, it is probably simpler to make “place” a synonym for “put”:

Understand the command "place" as "put".

And then replace “place in” with “insert into”, as in my first example. This works because the standard library already understands “put [thing] in [thing]” as a way to invoke the “inserting it into” action, and the line above will make it understand “place [thing] in [thing]” as a variant of this.

I suspect thus is because the second is missing at the very least a grammar line to match what is typed by the player:

Understand "Place [something] in [something]" as placing it in.

although it would make more sense to avoid creating an unnecessary new action ‘Placing it in’ and just allow this phrasing to refer to the existing ‘inserting it into’ action:

Understand "Place [something] in [an open container]" as inserting it into.

See §12.7. New actions  and  §17.2. New commands for old grammar