intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Feb 22, 2019 12:18 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Oct 03, 2012 12:16 am 
Offline
User avatar

Joined: Tue Sep 25, 2012 4:35 am
Posts: 17
Location: San Francisco, CA
Hi all

I'm very new to Inform and was wondering if I could get some help.

I've been tearing my hair out trying to compile a game that worked just fine before and now, seemingly for no reason, won't. And what makes it even more boggling to me is that it's an error with an extension. It's Conversational Framework by Eric Eve, and the errors are:

Code:
In Book 2 - Abbreviated commands for addressing the current interlocutor in the extension Conversation Framework by Eric Eve:

Problem. In the sentence 'let np be the number of visible people who are not the player'  , I was expecting to read a description of values, but instead found some text that I couldn't understand - 'visible people who are not the player'.

I was trying to match this phrase:

number of (visible people who are not the player - description of values)

This was what I found out:

visible people who are not the player = something unrecognised



--------------------------------------------------------------------------------

Problem. In the sentence 'let the interlocutor be a random visible person who is not the player'  , I was expecting to read a description of values, but instead found some text that I couldn't understand - 'visible person who is not the player'.

I was trying to match this phrase:

a/-- random (visible person who is not the player - description of values)

This was what I found out:

visible person who is not the player = something unrecognised



--------------------------------------------------------------------------------
In Book 3 - Greeting Protocols, Chapter 2 - Greeting in the extension Conversation Framework by Eric Eve:

Problem. In the sentence 'now the noun is a random visible person who is not the player'  , I was expecting to read a description of values, but instead found some text that I couldn't understand - 'visible person who is not the player'.

I was trying to match this phrase:

a/-- random (visible person who is not the player - description of values)

This was what I found out:

visible person who is not the player = something unrecognised




I've had Conversational Framework and Defaults installed since the beginning so I'm very confused.

Thanks!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 1:51 am 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 1619
First question: Have you added any other extensions recently?

Second question: Are you using the word "visible" in your own code for any reason?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 4:50 pm 
Offline
User avatar

Joined: Tue Sep 25, 2012 4:35 am
Posts: 17
Location: San Francisco, CA
Thanks for the reply Mr. Aikin!

In response to your first question
The only extension that I've added recently is List Control by Eric Eve, and that was after the fact to try and fix the problem, which it did not.

Complete list of extensions included: Basic Help Menu by Emily Short.
Basic Screen Effects by Emily Short.
Plurality by Emily Short.
Epistemology by Eric Eve.
List Control by Eric Eve.
Conversation Framework by Eric Eve.
Conversational Defaults by Eric Eve.

In response to your second
Yes. Only once and it relates to conversation. Here is the code:

Code:
Talking to is an action applying to one visible thing.
Understand "talk to [someone]" or “converse with
[someone]” as talking to.
Check talking to: say "[The noun] doesn't reply."


I can't remember if this was written after or before I started having problems. I'm pretty sure it was already there.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 6:08 pm 
Offline
User avatar

Joined: Tue Sep 25, 2012 4:35 am
Posts: 17
Location: San Francisco, CA
I just realized I forgot to add this to the problem list that came out. This is the part of my code.



Quote:
--------------------------------------------------------------------------------

Problem. In the sentence 'if player is examining something, say "There is not a complete absence of [...] t enough to continue on in safety." otherwise "Your headlamp illuminates your path adequately."' , it looks as if you intend 'player is examining something' to be a condition, but that would mean comparing two kinds of value which cannot mix - a person and a - so this must be incorrect.

I was trying to match this phrase:

if (player is examining something - a condition) , (say "There is not a complete absence of light here but not enough to continue on in safety." otherwise "Your headlamp illuminates your path adequately." - a phrase)

This was what I found out:

player is examining something = a condition

say "There is not a complete absence of [...] t enough to continue on in safety." otherwise "Your headlamp illuminates your path adequately." = an instruction to do something



and here is the code:

Code:
Rule for printing a refusal to act in the dark: if player is examining something, say "There is not a complete absence of light here but not enough to continue on in safety." otherwise "Your headlamp illuminates your path adequately."


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 6:39 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5568
Location: Burlington, VT
There I think you want "if examining something" or "if examining something" rather than "If the player is examining something." If you want to do something more complicated you could use the current action (see section 12.20 of the documentation), but you probably don't need it here.

The error message is definitely bugged -- it looks like this one, but maybe it'd be worth reporting.

I'm also not sure that you can put the if and the otherwise on the same line like that, but I could be wrong.

(I'm a bit confused by the otherwise message -- if it's a refusal to act in the dark, isn't it misleading to say "Your headlamp illuminates your path adequately"? That suggests that there is sufficient light.)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 9:11 pm 
Offline
User avatar

Joined: Tue Sep 25, 2012 4:35 am
Posts: 17
Location: San Francisco, CA
Thanks for pointing that out Matt! I cleaned up my code and that part seems to be working correctly (for now anyways), thank you. i changed it to:


Code:
Rule for printing a refusal to act in the dark: 
   if examining something:
      say "There isn't a complete absence of light here but not enough to examine something adequately."

Visibility rule when in darkness:
   if the headlamp is switched on:
      say "Your headlamp illuminates your path adequately."
      
Visibility rule when in darkness:
   if the headlamp is switched off:
      say "It's too dark here to continue on."


I wonder if that will be run now but I won't know yet because I'm still getting the same error messages with the extension. There's something I must be missing because it worked fine before. Why would it give me errors/bugs in the extension? I've tried re-downloading and installing but it doesn't seem to help.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 9:25 pm 
Offline

Joined: Sun Mar 01, 2009 8:02 pm
Posts: 1619
Everett wrote:
I wonder if that will be run now but I won't know yet because I'm still getting the same error messages with the extension. There's something I must be missing because it worked fine before. Why would it give me errors/bugs in the extension? I've tried re-downloading and installing but it doesn't seem to help.

My Inform is really rusty, so no guarantees, but if you want to send me the source code I'll take a look at it and see if I can spot anything wonky. Sometimes it's something completely unrelated to the error message, like a missing carriage return character or something. I'm at midiguru23 [at] sbcglobal [dot] net. If you want to try this, let me know which versions of all of the extensions you have. My extensions folder is fairly current, but not completely....


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Oct 03, 2012 9:39 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5568
Location: Burlington, VT
Everett wrote:
Thanks for pointing that out Matt! I cleaned up my code and that part seems to be working correctly (for now anyways), thank you. i changed it to:


Code:
Rule for printing a refusal to act in the dark: 
   if examining something:
      say "There isn't a complete absence of light here but not enough to examine something adequately."


This seems dangerous -- if you aren't examining then this won't print anything at all, I don't think. You can try this:

Code:
Rule for printing a refusal to act in the dark: 
   if examining:
       say "You can't see anything in here.";
   otherwise:
      continue the activity.


(Doesn't help with your other issue of course.)

Also looking at 17.16 suggests that "if we are examining something" would also work.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Oct 04, 2012 12:43 am 
Offline
User avatar

Joined: Tue Sep 25, 2012 4:35 am
Posts: 17
Location: San Francisco, CA
Quote:
This seems dangerous -- if you aren't examining then this won't print anything at all, I don't think.


You're absolutely correct, I really missed that one, thanks. Yeah, if you're in the dark how would you examine anything anyway? :oops: What you have is much better. I think I wanted to incorporate low-light conditions, in which you could move around but not examine, but I can't remember.

Yeah, I think I was looking at 17.16 when I wrote that. Thanks, Matt, what a huge help.

This extension thing has got me really bummed. Maybe I should learn Inform 6 or TADS?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Oct 04, 2012 12:47 am 
Offline

Joined: Tue Dec 25, 2007 10:06 am
Posts: 1547
If you don't know anymore what has changed between when it worked and when it stopped working, the best (maybe only) way to debug is to start a new project, copy-paste the story source code there and remove code small segments at a time and trying to compile in between changes. When the story compiles normally you know that you've just removed the offending part.

(It also helps to compile more often instead of writing huge chunks before trying if any of it works.)

_________________
TextureVorple


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group