Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002131Core InformAssertions and creationspublic2020-05-30 11:222020-05-30 11:22
Reporterotistdog 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusnewResolutionopen 
Platformx86OSLinuxOS VersionAny
Product Version6M62 
Target VersionFixed in Version 
Summary0002131: Sometimes use of "the player" in a stored action declaration generates I6 errors
DescriptionIn certain cases, attempting to (implicitly?) declare a (constant?) stored action with "the player" as the actor part is allowed by the I7 compiler and produces functional I6 code.

In other cases, attempting to declare an (explicit?) stored action with "the player" as the actor is allowed by the I7 compiler but produces I6 code that will not compile. Substituting "yourself" as the actor part will resolve the problem.

The example code shows both working and non-working variants of a few cases.

Minimal Source Text To Reproduce
"Bad Actions"

The first example is always the action of the player looking. [This variation compiles and works. Note 
use of "the player" as actor. ]

The second example is an action that varies. The second example is initially the action of the player 
looking. [This variation causes "Expected constant but found <expression>" errors during 
I6 compilation. Note use of "the player" as actor.]

[The second example is an action that varies. The second example is initially the action of yourself 
looking.] [This variation compiles and works. Note use of "yourself" as actor.]

A state is a kind of object. A state has a stored action called attached act.

Third example is a state.

The attached act of third example is the action of the player looking. [This variation causes "Expected 
constant but found <expression>" errors during I6 compilation. Note use of "the player" 
as actor.]

[The attached act of third example is the action of the yourself looking.] [This variation compiles and 
works. Note use of "yourself" as actor.]

Place is a room.

After jumping:
	say "first = [first example][line break]";
	say "second = [second example][line break]";
	say "third  = [attached act of third example][line break]"
Additional InformationThe I6 compiler error generated by the source is:

C:\Program Files (x86)\Inform 7\Compilers\ni \
    -internal "C:\Program Files (x86)\Inform 7\Internal" -project "C:\Users\XXXXXX\Documents\Inform\Projects\Bad Action.inform" -format=ulx
Inform 7 build 6M62 has started.
I've now read your source text, which is 93 words long.
I've also read Standard Rules by Graham Nelson, which is 42655 words long.
I've also read English Language by Graham Nelson, which is 2297 words long.

  The 93-word source text has successfully been translated into an intermediate
    description which can be run through Inform 6 to complete compilation.
    There were 1 room and 1 thing.
Inform 7 has finished.

C:\Program Files (x86)\Inform 7\Compilers\inform6 \
    -wSDG +include_path=..\Source,.\ auto.inf output.ulx
Inform 6.33N for Win32 (30th August 2015)
auto.inf(56155): Error: Expected constant but found <expression>
> Array BC_153 --> 0 (101449728) STORED_ACTION_TY MAX_POSITIVE_NUMBER ...etc
auto.inf(56169): Error: Expected constant but found <expression>
> Array BC_167 --> 0 (101449728) STORED_ACTION_TY MAX_POSITIVE_NUMBER ...etc
In: 1 source code files 66529 syntactic lines
 56184 textual lines 2057495 characters (ISO 8859-1 Latin1)
Allocated:
  8089 symbols (maximum 20000) 13803019 bytes of memory
Out: Glulx story file 1.200530 (587K long):
    22 classes (maximum 200) 44 objects (maximum 640)
   230 global vars (maximum 512) 85371 variable/array space (maximum 180000)
    96 verbs (maximum 255) 316 dictionary entries (maximum 2000)
   179 grammar lines (version 2) 251 grammar tokens (unlimited)
   101 actions (maximum 200) 37 attributes (maximum 56)
    40 common props (maximum 256) 21 individual props (unlimited)
109143 characters used in text 85602 bytes compressed (rate 0.784)
     0 abbreviations (maximum 64) 2888 routines (unlimited)
 69635 instructions of code 39348 sequence points
105984 bytes writable memory used 495104 bytes read-only memory used
601088 bytes used in machine 1073140736 bytes free in machine
Compiled with 2 errors and 1650 suppressed warnings (no output)
Completed in 0 seconds

Compiler finished with code 1
TagsNo tags attached.
Effect(mild) Inform 6 reports errors for invalid code
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2020-05-30 11:22 otistdog New Issue


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker