Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000871Core InformTesting commandspublic2012-02-26 01:192014-05-07 07:33
ReporterRon Newcomb 
Assigned Tograham 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionfixed 
PlatformPPCOSMac OS XOS Version10.4
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000871: RULES ALL omits rules of the form "Carry out Xing where..." in some circumstances
DescriptionRULES ALL is supposed to say if a rule applies or does not, but in this bug it does print any line whatsoever.

It seems to happen for the case that:
1) the rule is for the player only, not "an actor"
2) the rule has a WHEN clause
3) the WHEN clause evaluates to FALSE
4) the actor check successfully ensures that the player is the actor

In the example below, the named rule appears in RULES ALL output for BOB, WAIT, but it doesn't appear at all for WAIT, implying the rule doesn't exist or that the author's code has broken Inform somehow (which isn't the case).
Minimal Source Text To Reproduce
X and Y are numbers that vary.
X is 5.
Y is 1.

Carry out waiting when X is Y (this is the THIS RULE EXISTS rule):
	say "This rule never applies, but RULES ALL may not even acknowledge its existence."
	

There is a room.

Bob is a man, here.  Persuasion: rule succeeds.

Test me with "RULES ALL / WAIT / BOB, WAIT". 

Additional InformationThe rules of that form compile to the following form. Note that the first two if-statements are separate; in "the actor" rules, those two if-statements would be joined into a single if-statement.

[ R_740 ;
   if (actor == player) {
   if (((((((Global_Vars-->9) == (Global_Vars-->10))))))) { ! Runs only while condition holds
   if (debug_rules) DB_Rule(R_740, 740);

       ... rule body ...

   } ! Runs only when actor is the player
   } ! Runs only while condition holds
   else if (debug_rules > 1) DB_Rule(R_740, 740, true);
   rfalse;
];
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0001592)
Ron Newcomb (reporter)
2012-02-26 01:21

>test me
(Testing.)

>[1] rules all
Rules tracing now switched to "all". Type "rules off" to switch it off again.

>[2] wait
[Rule "standard set going variables rule" does not apply.]
[Rule "determine visibility ceiling rule" does not apply.]
[Rule "Setting action variables for exiting" does not apply.]
[Rule "standard report waiting rule" applies.]
Time passes.

>[3] bob, wait
[Rule "standard set going variables rule" does not apply.]
[Rule "determine visibility ceiling rule" does not apply.]
[Rule "Setting action variables for exiting" does not apply.]
[Rule "standard set going variables rule" does not apply.]
[Rule "determine visibility ceiling rule" does not apply.]
[Rule "Setting action variables for exiting" does not apply.]
[Rule "THIS RULE EXISTS rule" does not apply.]
[Rule "standard report waiting rule" applies.]
Bob waits.

>

- Issue History
Date Modified Username Field Change
2012-02-26 01:19 Ron Newcomb New Issue
2012-02-26 01:21 Ron Newcomb Note Added: 0001592
2012-02-27 09:08 EmacsUser Status new => confirmed
2014-01-25 16:56 graham Status confirmed => resolved
2014-01-25 16:56 graham Resolution open => fixed
2014-01-25 16:56 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker