I just purchased my Devs license so I can start testing on a real device, but I’m having problems adapting my config.lua to the latest “ultimate config.lua”.
Here is the original config:
application = { content = { width = 768, height = 1024, scale = "letterBox", fps = 60, imageSuffix = { ["-hd"] = 2, ["-ipadhd"] = 4 } }, LevelHelperSettings = { imagesSubfolder = "images", levelsSubfolder = "levels" }, SpriteHelperSettings = { imagesSubfolder = "images" } }
And the updated version:
application = { content = { width = aspectRatio \> 1.5 and 800 or math.ceil( 1200 / aspectRatio ), height = aspectRatio \< 1.5 and 1200 or math.ceil( 800 \* aspectRatio ), scale = "letterBox", fps = 60, imageSuffix = { ["-hd"] = 1.5, ["-ipadhd"] = 3.0 } }, LevelHelperSettings = { imagesSubfolder = "images", levelsSubfolder = "levels" }, SpriteHelperSettings = { imagesSubfolder = "images" } }
When I run the simulator I get this error:
**"Line: 30
Attempt to compare number with nil"**
Line #30 -
width = aspectRatio > 1.5 and 800 or math.ceil( 1200 / aspectRatio ),
Anyone have a suggestion on how to fix this?
-Saer
Edit: I should probably clarify about the -hd, -ipadhd
-hd - suffix for HD images.
-ipadhd - suffix for 2x HD images.