|Anonymous | Login | Signup for a new account||2018-10-20 01:17 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000497||Core Inform||Relations||public||2011-01-08 13:50||2014-05-07 07:35|
|Target Version||Fixed in Version||6L02|
|Summary||0000497: "number of steps via" does not work for relations involving values|
|Description||Any attempt to use "the number of steps via <relation involving values> from <value> to <value>" returns an error at compile-time stating that the <value> has the wrong type (i.e. that it should be an object, not a value).|
I have only tested this with kinds of values that I created myself.
|Minimal Source Text To Reproduce|
"test" by test X-type is a kind of value. The X-types are XA, XB, and XC. X-relating relates various X-types to one X-type. When play begins: showme whether or not the number of steps via the X-relating relation from XA to XB is at least 0. The lab is a room.
|Tags||No tags attached.|
|Effect||(cosmetic) Error message is badly worded|
edited on: 2011-01-08 16:02
Confirmed, but according to WI 13.11, this is only supported for relations between objects anyway. The error message you received is a reflection of the fact that the "number of steps via" phrase requires its parameters to be objects.
However, the underlying issue is that pathfinding isn't implemented for dynamic relations between any types. Relations involving values are always dynamic, but dynamic relations between objects can be created as follows:
Home is a room.
A table is here. An apple is on the table. A glass is on the table. Some water is in the glass.
When play begins:
let R be a various-to-various relation of objects to objects;
now R relates the player to the table;
now R relates the table to the glass;
now R relates the glass to the water;
let N be the number of steps via R from the player to the water;
That code fails with a misleading runtime error:
*** Run-time problem P30: Attempt to find route or count steps through an implicit relation.
The lack of pathfinding for these relations is more of a feature request than a bug (and should be reported at inform7.uservoice.com), but the errors and/or documentation could perhaps be improved in the meantime.
I've tightened up type-checking on these phrases so that clearer problem messages result: in particular Inform now reports
... 'X-relating relation' has the wrong kind of value: a relation of x-types rather than a relation of objects.
|2011-01-08 13:50||ErWenn||New Issue|
|2011-01-08 16:01||jmcgrew||Effect||(serious) Compiler rejects valid code => (cosmetic) Error message is badly worded|
|2011-01-08 16:01||jmcgrew||Note Added: 0000951|
|2011-01-08 16:01||jmcgrew||Priority||high => normal|
|2011-01-08 16:01||jmcgrew||Severity||serious => cosmetic|
|2011-01-08 16:01||jmcgrew||Status||new => confirmed|
|2011-01-08 16:02||jmcgrew||Note Edited: 0000951||View Revisions|
|2011-08-20 10:35||EmacsUser||Relationship added||related to 0000617|
|2011-10-15 09:24||graham||Note Added: 0001379|
|2011-10-15 09:24||graham||Status||confirmed => resolved|
|2011-10-15 09:24||graham||Resolution||open => fixed|
|2011-10-15 09:24||graham||Assigned To||=> graham|
|2014-05-07 07:34||jmcgrew||Fixed in Version||=> 6L02|
|2014-05-07 07:35||jmcgrew||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|