looking up runtime errors

I have a runtime error. I’ve had them more than once. The question is:
where do I go to look up the reference it gives me?

***Run-time problem P47 (at paragraph 332 in): Phrase applied to an incompatible kind of value

I’m using the IDE so there are no pages, if that’s what P47 refers to.
I would like to know the answer to this in general, for future errors.

Those problem numbers are internal to Inform. They are not documented. The text of the error tells you what you need to know.

Which version of the IDE are you using (Windows? MacOS?) What’s supposed to happen is that, when the game is run in the IDE and an RTP occurs, the IDE notices that “*** Run-time problem” text and shows an appriopriate help page.

Tries to, at least. In my experience, the page doesn’t actually reflect the actual error, but it’s helpful nonetheless for trying to figure out what happened.

This reminds me: Inform’s habit of identifying problem locations by “paragraph” is extremely bad for anyone not using the official IDE. I wish it gave line numbers. (It’d be fine to give both.)

Paragraph numbers are line numbers. Inform lines can get very long, so the editor soft-wraps them, so the IDE refers to them consistently as “paragraphs”. But that’s just labelling.

It’s possible that the line numbers don’t match the source for reasons unrelated to text formatting. (I don’t have an example in front of me, but the I6T translation may mess up the line count.)

1 Like

Ah, really? If that’s true, it’s definitely not so bad, as long as your parenthetical isn’t true.

In fve minutes of trying I failed to generate a runtime error with a paragraph number in it. :)

2 Likes

Thanks, then I’ll stop trying.

1 Like

This code:

"Type Unsafe"

lab is a room.

[ commentary ]

obj is an object variable. obj is initially yourself. the description of the lab
is "I don't usually do multi-statement 'paragraphs' of code". The carrying
capacity of the player is 12.

[ further
commentary ]

when play begins:
  say "bar";
  say room north of obj;
  say "foo";

results in

bar
*** Run-time problem P47 (at paragraph 16 in the source text): Phrase applied to an incompatible kind of value.

nothingfoo
Type Unsafe
An Interactive Fiction
Release 1 / Serial number 260312 / Inform 7 v10.1.2 / D

lab
I don’t usually do multi-statement “paragraphs” of code

The problematic line, say room north of obj is, indeed, line 16.

2 Likes

Okay, here’s what I got from this set of answers. The error itself is not documented in a help text, but the paragraph number shows what line in the source code was errant. However, in my error above, it says (at paragraph 332 in); and by paragraph, it means line number.

First, my error does not say source code, like Zed’s example (I spent a lot of time trying to find the errant line).
Second, does it apply to extensions, which have multiple lines with the same line number? Do I have to count down through pages of source code to get to the errant number?

btw, my run-time error was that I was trying to use a kind that was not the kind of my object. And I am running in the Mac IDE.