Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Tutorial #2 - LookUnder Question

A topic by fos1 created Apr 15, 2021 Views: 176 Replies: 5
Viewing posts 1 to 6

I hope it is OK to add code questions here, I have trouble following the unthreaded responses on Discord. 

When adding this code from Punyinform Tutorial 2:

Extend 'look'

* 'under' noun -> LookUnder;

[ LookUnderSub;

"There's probably not much to see there. ";

];

I get the following compile error:

Inform 6.35 (in development)

line 121: Error: There is no previous grammar for the verb "look"

> Extend 'look'

line 123: Error: Expected directive, '[' or class name but found *

> *

line 127: Warning: Routine "LookUnderSub" declared but not used

Compiled with 2 errors and 1 warning (no output)

Do I need to define the verb “look” to make this work? Or?

HostSubmitted (2 edits) (+1)

I think you may have written this code in the wrong place in your source code. You have to place it somewhere after:

Include "puny.h";

Thank you for the tip. In the comments section of the template, it stated that variables and entry point routines had to be placed between globals.h and puny.h.

I must have misunderstood and thought that to include things like verb modifications.

v/r

Jeff

HostSubmitted(+1)

I'll have a look and see if we can make the game template code clearer on this matter.

Thank you.

I am learning so much about I6 coding during this jam!

Two more tricky tasks involving the pile of fabric and I be able to move on to the Pub interior. 

Submitted(+1)

I added that, as well, as it's a pretty obvious thing for the player to try. FWIW, 'look under' is actually one of the supported verb phrases in the Inform 6 standard library, but it's not in PunyInform. Keep that in mind if you ever need to port a game from the standard library to PunyInform or vice versa. The only other significant difference I came across was certain uses of 'climb', but that will be in the next release.