Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000513Core InformRules and rulebookspublic2011-01-19 18:442014-05-07 07:35
ReporterRon Newcomb 
Assigned Tograham 
PlatformPPCOSMac OS XOS Version10.4
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000513: can't pass 0 to any rulebook
DescriptionThe example is for a "number based rulebook", but the bug is for anything when 0 is passed. (Such as passing "the procedural rulebook" to a rule based rulebook, as in bug 0000512, likely trying to pass Nothing to an object based rulebook, etc.)

The responsible code is in ProcessRulebook(), which takes parameters:

   [ ProcessRulebook rulebook parameter bits rv <etc.>

and quickly uses the line:

    if (parameter) parameter_object = parameter;

It is parameter_object which is exposed to I7, as "the item described", "the container in question", "the supporter in question", "parameter-object", "scene being changed", anything an extension decides to call it, such as "the number being tabulated", etc. Even when explicitly giving a name to the parameter:

    Tabulate a number (called foo):....

Create a local variable for foo (like t_0) and initializes it to parameter_object.

What parameter_object holds when 0 is passed is left over from whatever last used it, as the below example shows.
Minimal Source Text To Reproduce
"parameter passing" by Ron Newcomb

there is room.

Tabulate rules are a number based rulebook.

When play begins:
	consider the tabulate rules for 5;
	consider the tabulate rules for 0;
	consider the tabulate rules for 3;

Tabulate a number (called foo): say "now tabulating [foo]."
Additional Informationnow tabulating 5.
now tabulating 5.
now tabulating 3.

parameter passing
An Interactive Fiction by Ron Newcomb
Release 1 / Serial number 110119 / Inform 7 build 6G60 (I6/v6.32 lib 6/12N) SD


TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships
has duplicate 0000563closedjmcgrew Activity on numbers doesn't accept zero 

-  Notes
graham (administrator)
2011-12-17 16:45

Trickier than it looked, because fixing it brought out a bug in the nondescript items activity, but fixed. Internally, "parameter_value", an untyped I6-only variable, is now used for the passed value; "parameter_object" is used only for specific purposes to do with objects.

- Issue History
Date Modified Username Field Change
2011-01-19 18:44 Ron Newcomb New Issue
2011-01-20 02:38 jmcgrew Status new => acknowledged
2011-01-21 09:32 EmacsUser Status acknowledged => confirmed
2011-02-14 14:05 jmcgrew Relationship added has duplicate 0000563
2011-12-17 16:45 graham Note Added: 0001496
2011-12-17 16:45 graham Status confirmed => resolved
2011-12-17 16:45 graham Resolution open => fixed
2011-12-17 16:45 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
Powered by Mantis Bugtracker