Sand-dancer failing to compile with 6F95

Several errors like this one:

Most of the errors are related to this text:

[code]Check trading when trader needs more memories: move the noun to the trader; instead say “[The trader] touches your fingertips and pulls [the noun] through your nerve endings. ‘Good,’ he says, ‘I’ll take that, although it’s not enough to complete the trade.’[paragraph break]Somewhere inside you, things are shifting, moving, growing.”"

To decide whether (trader - a person) needs more memories:
let the projected total be the number of memories held by trader + 1;
if the projected total is less than the price of trader, decide yes;
decide no.[/code]
The phrase (trader - sand-dancer) only appears at the bottom of the source file.

Any ideas?

I had the same problem. I changed all of the trader-checking “check when” code to this:

Check trading: if the trader is not a spirit animal: instead say "There's no one here to trade with."; if the noun is not a memory: instead say "'I'm only interested in trading memories,' [the trader] says."; if the second noun is not a talent: instead say "'I only have talents to offer you,' says [the trader], '[list of visible not held talents].'"; if the second noun is held: instead say "You've already got the talent of [second noun]."; if the noun is not in emotional baggage: instead say "You've already traded away that memory."; if trader needs more memories: move the noun to the trader; instead say "[The trader] touches your fingertips and pulls [the noun] through your nerve endings. 'Good,' he says, 'I'll take that, although it's not enough to complete the trade.'[paragraph break]Somewhere inside you, things are shifting, moving, growing."

That compiles fine and seems to work (I’ve only played through Rabbit’s Offer). I did get this run-time error, which seems unrelated: “Since the desert hare is not allowed the property “price”, it is against the rules to try to use it.” I haven’t figured out what is causing that, since it looks like the code isn’t doing much of anything with the desert hare.

That bug surely stems from the following piece of code (I haven’t checked the source text on the website - only that in the book). It should be in Part - Mechanics, Chapter - Memories.

To decide whether insufficient memories found: if Pursuit is happening and the number of memories in emotional baggage is less than the price of Hare, decide yes;
etc…

where “Hare” should definitely be “Rabbit”.

Yep, that was it.

So this is all well and good, but the conscientious developer in me feels compelled to discover if this was actually a bug in the source text or if this was a bug in the 6F95 release. I couldn’t find a smoking gun in the release notes, and the “fix” just looks like an attempt to rephrase something that should work into something else that does work. Could someone with more experience than I figure that out? I was hoping that someone could point to some phrase in the source code and announce, “Ah, there’s your bug!”

Anyone?

To add to the research into the problem I’ve got a much simpler one-line change to make the original sand-dancer code compile with 6F95:

Change the first check trading needs more memories to explicitly check that the trader is not sand-dancer:

Check trading when trader needs more memories and the trader is not sand-dancer:

The run-time error with Hare still happens in 6F95, so change it to Rabbit as described in this thead.

I could be going in the wrong direction here, but as I’ve had a number of other minor issues with various extensions giving run-time errors under 6F95 it looks like it’s got something to do with type checking. 6F95 is checking the type of objects all the time. The Hare/Rabbit issue seems to be that problem and maybe the trader vs. sand-dancer check is the same type of problem? Inform doesn’t seem to be able to see the difference between any trader (a person) or sand-dancer (a specific trader person) without the additional code above.

EDIT:

I guess inform cannot decide which ‘to decide’ code to use? Or am I completely wrong?

[code]To decide whether (trader - a person) needs more memories: …

To decide whether (trader - Sand-dancer) needs more memories: …
[/code]

Although the type-checking will make inform code better and cleaner, it means authors will have to do more run-time testing to make sure everything is always of the correct type, otherwise at least a run-time error will happen under certain conditions.

Can anyone else add any comments to the real cause of the errors?

It’s a bug in 6F95; I’ve reported it at inform7.com/mantis/view.php?id=410.

Edit: Also, Neurosion, if you have an account on Mantis, let me know, so I can change the reporter to you.

Hey all-- first of all, it’s a gift to log onto a forum and discover that people have not only found your bugs, but diagnosed them and fixed them as well. You are all amazing.

I’m updating Sand-dancer and book text for 6F95 (just a few changes here and there). The “hare/rabbit” confusion is fixed-- oops, embarrassing. It’s nice to see the bug report also. In general, this style of syntax should work, though, right?

[code]To decide whether (trader - a person) needs more memories: …

To decide whether (trader - Sand-dancer) needs more memories: …[/code]
I swear there’s an example very similar to this somewhere in the official docs, but now I can’t find it. It seems an elegant way to write more specific rules. Is the consensus that this no longer works because of 6F95’s more stringent type-checking, or is it just temporarily stymied because of the bug?

Just stymied. And you’re right that it is in the docs—see WI 11.3’s shivering example.

Aaron, very cool to update this stuff to the latest. Much appreciated.

I have been coding away on my first Inform7 project in 6E72 while reading your book and using the keyword interface. I tried 6F95 when it first came out as part of a switch to the Mac and got some errors compiling that seemed to be about the keyword stuff. I had no idea what the messages meant, so I quickly fled back to the safety of 6E72 on Windows.

I’m assuming that’s all fixed with the update you did to the extension. I’ve also held back adding Extended Grammar, Small Kindness, Smarter Parser, Poor Man’s Mistype, Numbered Disambiguation until I got my game to a point where the opening scene is more-or-less complete as a proof of concept for the game.

Are there any changes needed to my existing code to upgrade the IDE to 6F95? Anything else I should be worried about?

Update: The upgrade went fine. Note that Smarter Parser requires Glulx.

–Zack
z-machine-matter.com

Well, I was waiting for the new build to fix the bug before updating, but since it didn’t, I’ve gone ahead and added veryalien’s hack into the latest Sand-dancer code and updated the book’s errata page accordingly. Sand-dancer’s code as it appears on the website should now compile with 6G60.