johanberntsson / PunyInform

A fast and compact library for writing text adventure games for the Z-machine running on 8-bit computers as well as other platforms.
MIT License
176 stars 17 forks source link

short_name not functioning #82

Closed ghost closed 3 years ago

ghost commented 3 years ago

i have copied the painting with a short_name exactly as it is "PunyInform Coding 1", but the name isn't changing to the short_name after it has been examined.

additionally, giving a door a short_name results in the game crashing.

Inform v6.35 PunyInform v2.6 D (inform6unix)

ghost commented 3 years ago

here is an example

Object hallway "the hallway"         with             description "you are standing in a hallway next to a door",             n_to doorway;

Object doorway "doorway"         with             name 'door',             short_name 'the door',             description "it's a door like any other",             found_in hallway never,             door_dir (n_to) (s_to),         has static door openable;

Object never "never"         with             description "you'll never make it in here!";

that produces

You can see a Fatal error: Call to non-routine [Hit any key to exit.]

johanberntsson commented 3 years ago

short_name only takes a string or a routine, but you have entered a dictionary word. Use " instead of ' and it will work.Object doorway "doorway" with name 'door', short_name "the door", description "it's a door like any other", found_in hallway never, door_dir (n_to) (s_to), has static door openable;

johanberntsson commented 3 years ago

Furthermore it will be strange if you add the article in the short_name. If that is intentional you'd better add proper as an attribute, otherwise you will see: You can see a the door here.

ghost commented 3 years ago

ah that was the problem! thanks for the quick reply.