MantisBT - Core Inform
View Issue Details
0000293Core InformListspublic2010-09-16 13:382010-10-28 00:30
AaronReed 
graham 
normalcriticalalways
closedfixed 
x86Mac OS X10.6
6E72 
6F95 
(critical) Compiler reports internal error
0000293: Substitutions in list of indexed texts cause compiler problems.
Including text substitutions in an indexed text seems to cause the resultant text to be permanently stored in that variable, which is very useful. However, when doing the same for an indexed text that appears as part of a list, it seems this does not happen, leading to an internal error. (Both the working "Indexed Text" and failing "List of Indexed Texts" versions appear in the source example.)
Config line is an indexed text variable. Config line is "monsters=25".

Stage is a room.

Section - List of Indexed Texts - this doesn't work

Key value pair is a list of indexed texts variable.

When play begins: set key value pair for config line.

To set key value pair for (thisline - an indexed text):
if thisline matches the regular expression "(.*)=(.*)":
now key value pair is {"[text matching subexpression 1]", "[text matching subexpression 2]"}.

[Section - Indexed Text - this works

JustKey is an indexed text variable.

To set justkey for (thisline - an indexed text):
if thisline matches the regular expression "(.*)=(.*)":
now justKey is "[text matching subexpression 1]".

When play begins: set justkey for config line.]
No tags attached.
Issue History
2010-09-16 13:38AaronReedNew Issue
2010-09-16 17:08jmcgrewSeveritymild => critical
2010-09-16 17:08jmcgrewStatusnew => acknowledged
2010-09-17 10:09EmacsUserNote Added: 0000556
2010-09-17 10:09EmacsUserStatusacknowledged => confirmed
2010-09-20 15:16grahamNote Added: 0000563
2010-09-20 15:16grahamStatusconfirmed => resolved
2010-09-20 15:16grahamResolutionopen => fixed
2010-09-20 15:16grahamAssigned To => graham
2010-10-25 21:14jmcgrewFixed in Version => 6F95
2010-10-28 00:30jmcgrewStatusresolved => closed

Notes
(0000556)
EmacsUser   
2010-09-17 10:09   
This is a mighty strange one. A reduced version is:

- - - -
There is a room.
To foo (thisline - an indexed text):
showme {"[the player]"}.
- - - -

But the similar looking

- - - -
There is a room.
When play begins:
showme {"[the player]"}.
- - - -

works, as does

- - - -
There is a room.
To foo (thisline - an indexed text variable):
showme {"[the player]"}.
- - - -

though the latter fails when foo is reachable, as in

- - - -
There is a room.

X is an indexed text that varies.

When play begins:
foo X.

To foo (thisline - an indexed text variable):
showme {"[the player]"}.
- - - -
(0000563)
graham   
2010-09-20 15:16   
A timing problem, now fixed.