Chaosforge Forum

DoomRL => Bug Reports => Topic started by: MDM on March 01, 2011, 04:38

Title: [0.9.9.2] config.lua - case sensitive FALSE/false and TRUE/true
Post by: MDM on March 01, 2011, 04:38
When editing the file config.lua I noticed the following:

In the comments almost always "FALSE" or "TRUE" are written upper case.

If I use "FALSE" or "TRUE" anywhere I get the following when I start the game:
An unhandled exception occurred at $00459433 :
EVariantTypeCastError : Could not convert variant of type (Null) into type (Boolean)
  $00459433
  $00453322
  $0041CECD  TDOOM__CREATE,  line 290 of src/doombase.pas
  $00402069  main,  line 74 of src/doomrl.pas

When using "false" or "true" lower case then everything is fine.

Or to make it short:
if( FILE( "CONFIG.LUA" )::edit( "Use uppercase TRUE or FALSE" ) == TRUE ) {
    APP->crash( "unhandled exception" );
}
Title: Re: [0.9.9.2] config.lua - case sensitive FALSE/false and TRUE/true
Post by: Tavana on March 01, 2011, 04:56
This would be a condition of converting from old .ini files to new .lua files. We're bound to forget some things...like true and false are lowercase in lua.

The FALSE's and TRUE's in the config.lua file have been changed.