|Anonymous | Login | Signup for a new account||2018-10-18 14:50 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000513||Core Inform||Rules and rulebooks||public||2011-01-19 18:44||2014-05-07 07:35|
|Platform||PPC||OS||Mac OS X||OS Version||10.4|
|Target Version||Fixed in Version||6L02|
|Summary||0000513: can't pass 0 to any rulebook|
|Description||The 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 Information||now tabulating 5.|
now tabulating 5.
now tabulating 3.
An Interactive Fiction by Ron Newcomb
Release 1 / Serial number 110119 / Inform 7 build 6G60 (I6/v6.32 lib 6/12N) SD
|Tags||No tags attached.|
|Effect||(serious/mild) Game compiles but misbehaves|
|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.|
|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|