Inform - Support - Patches

About Patches  


DM4 Errata  

Issue C62120

(X in nothing) objectloop fails
Submitted by: Eric Schmidt     Appeared in: Compiler 6.21 or before     Fixed in: -

Consider this sample routine:

  [ Initialise x;
    location = livingroom;
    objectloop (x in nothing) give x light;
    "What a mess is it here after that party!
     And your relatives arrive in just a few

(Yes, there are better ways of making it light everywhere. This is just for example.) The code generates an error message at run time, but there is no reason it should. The correct behavior is to give every object without a parent light. (Yes, this causes problems if there are items out-of-play. Maybe there aren't.)


The compiler is using an optimized version of objectloop where the loop follows the eldest child and proceeds through the siblings. It is illegal to find the child of nothing, and that is why an error occurs. If this is a problem, modify the control expression so it is not in the "x in y" form, such as objectloop (x && x in nothing).

Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.