You must provide a noun problem plz help me

My code is kinda weird so Ima not gonna try explain it but I want to not get the “You must provide a noun” error

Stacking is an action applying to one thing. Understand "stack food trays", "stack foodtray", "stack foodtrays", "stack food tray" as stacking.

Instead of stacking:
	If height is 1:
		say "You stack all of the food trays into a pile in the corner";
		increase height by food tray counter;
		Now food tray counter is 1;

If you can help, Thanks in advance : )

1 Like

I’m not proficient in Inform, but from what I can tell you shouldn’t say Understand stacking as "stack food trays". and the sort. What it’s getting from this is to understand “stack food trays [object]” as the verb you have to type in (because you said (...) as applying to one thing. so it assumes to put an object at the end.

What you should probably do is (I can’t promise this code will directly work):
Understand "stack [object]" as stacking.

Because putting “food trays” will just make it part of the syntax of the verb. Have you added an object for the food trays? That’s where you’d implement how to refer to the food trays.

I also wouldn’t directly make a verb apply to one object, since then if you try to say “stack dog” in the game then the game would respond “I can’t understand that command.”


Max is essentially correct here and the code is almost right (should be ‘something’ rather than ‘object’). What you want to do is make sure you have a food trays item, and put the synonyms for the tray on that item, like this:

Stacking is an action applying to one thing. Understand "stack [something]" as stacking.

The food trays are a thing. Understand "tray", "foodtray" and "food tray" as the food trays.

I knew that you could do that, but I wanted to make it so if someone said “stack foodtray” it would still work because the item is called “food tray”. I wasn’t sure how to work around that, so I did what I have now.

Is there a way to make it work both ways. Or could I just make another item called foodtray, and then copy the code I have for the food tray and make it the same for the foodtray?

Thanks XD

No! XD Objects aren’t that limited. As I said before, if you read the documentation for objects, it teaches you how to create synonyms for objects. You can create hundreds of synonyms. Like I said before, I don’t have documentation ready, but it’s something like:
Understand "food/-- tray/trays/foodtray/foodtrays" as the food trays.
Of course, your object might not specifically be called “food trays” in your code, but you get my gist. The /-- in the code tells you the word is optional, so here you can type in: foodtrays, foodtray, tray, trays, food tray or food trays and it will work. :slight_smile:


Thanks for that XD

You have been so helpful!

No problem!

1 Like

I just a second ago realized what you said was the same thing as Someone2 until recently. I guess my brain wasn’t turned on. XD Thanks for helping.

1 Like