Data Realms Fan Forums
http://45.55.195.193/

Stealthy INI parser bug?
http://45.55.195.193/viewtopic.php?f=72&t=25478
Page 1 of 1

Author:  weegee [ Sat Sep 10, 2011 7:30 pm ]
Post subject:  Stealthy INI parser bug?

If you make double indentation instead of single while declaring Terrain CC won't report any errors or crash it just silently swallows all what's left after incorrect fragment. Example:
Code:
AddTerrain = SLTerrain
      PresetName = Attack05Terrain
      BitmapFile = ContentFile
         Path = UnmappedLands.rte/Scenes/Attack05Terrain.bmp
      WrapX = 0
      WrapY = 0
      ScrollRatio = Vector
         X = -1.0
         Y = -1.0
      BackgroundTexture = ContentFile
         Path = Base.rte/Scenes/Textures/DirtDark.bmp
      AddTerrainFrosting = TerrainFrosting
         TargetMaterial = Material
            CopyOf = Topsoil
         FrostingMaterial = Material
            CopyOf = Grass
         MinThickness = 5
         MaxThickness = 7
         InAirOnly = 1
      AddTerrainDebris = TerrainDebris
         CopyOf = Gold
      AddTerrainDebris = TerrainDebris
         CopyOf = Plants
      AddTerrainDebris = TerrainDebris
         CopyOf = Boulders

BlaBlaBla


Notice double indentation after AddTerrain = SLTerrain. In this code BlaBlaBla will never trigger any errors, and everything after this chunk will not be parsed. Debugged this for an hour so watch your steps guys! :)

Author:  Roast Veg [ Sat Sep 10, 2011 11:15 pm ]
Post subject:  Re: Stealthy INI parser bug?

Except that what you're hiding would have to be at the top for it to work.

Author:  411570N3 [ Sun Sep 11, 2011 10:02 am ]
Post subject:  Re: Stealthy INI parser bug?

It just moves onto the next module, actually, so you can have it inside a file for it to void the remaining files all the way up to the Index.ini.
Found this error when trying to make compilations; everyone puts indents by the first layer of IncludeFiles their Index.ini, which causes the error. It otherwise would never show up, so it's common practice anyway.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/