Failing the IQ test, first tutorial

Hello all!

Well, when I was using the publicly available non-beta lime, I was able to load up a test map with no problem.

Now, I’ve grabbed the latest beta, and did the following:

  
local lime = require("lime")  
--Now load up your map data:  
  
local map = lime.loadMap("testmap.tmx")  
--After loading up your map you will not have any visual objects created, this allows you to load up multiple maps at once yet only creating the visual data later one at a time, to actually create the visual representation simply use the next line of code:  
  
local visual = lime.createVisual(map)  

yet all I get is a blank screen.

I have been known to be quite dense, so is anything leaping out at anyone immediately?

I tried saving my tmx files out as both csv and XML and to no avail.

Love,
Mario [import]uid: 11636 topic_id: 4457 reply_id: 304457[/import]

Perhaps someone who has a working example can email it to me or post it somewhere? mario.roberti@gmail.com (Yes, I am not afraid of SPAM…I am that awesome)

Thx in advance!

Love,
Mario [import]uid: 11636 topic_id: 4457 reply_id: 13911[/import]

[edit]

Forgot to include the debug output…no errors, just :
Copyright © 2009-2010 A n s c a , I n c .
Version: 2.0.0
Build: 2010.243
The file sandbox for this project is located at the following folder:
(/Users/mroberti/Library/Application Support/Corona Simulator/TileTest-FC7CA236EC8DAFAC746E3E00C81598F9)
Coconut: Creating Map
Coconut: Creating layer - Tile Layer 1
Coconut: Map created
Done!
logout

[Process completed]
I added the “Done!” part from within my main.lua part. [import]uid: 11636 topic_id: 4457 reply_id: 13943[/import]

Hi Mario, that should be working. Could you send me your mapfile so that I can take a look at it? [import]uid: 5833 topic_id: 4457 reply_id: 13971[/import]

Mario, Graham,

I have the exact same issue. I’ll send mine as well,

Cheers!

Rob
[import]uid: 12431 topic_id: 4457 reply_id: 13987[/import]

Hi both Mario and Rob,

I have realised my foolish mistake, in the current version you also need to update the map. This will be changed in a later version.

Sorry for the mistake.

[code]
local onUpdate = function(event)
lime.updateMap(map)
end

Runtime:addEventListener(“enterFrame”, onUpdate)
[/code] [import]uid: 5833 topic_id: 4457 reply_id: 14012[/import]

Thanks Graham

That fixed it for me.

Cheers!

Rob
[import]uid: 12431 topic_id: 4457 reply_id: 14014[/import]

Glad to hear it! [import]uid: 5833 topic_id: 4457 reply_id: 14050[/import]

I’m also failing the IQ test. My map is appearing but it is shown portrait so only a slice is shown. I’m also missing the blue sky background… [import]uid: 11904 topic_id: 4457 reply_id: 14507[/import]

You will probably need to set in your build.settings file your default orientation, if this doesn’t work (or it’s a different problem you are having) please send me your project and I will have a look at it for you. [import]uid: 5833 topic_id: 4457 reply_id: 14519[/import]

Thanks. Build settings did fix the orientation. Suggest you mention this need in your Tutorial 1 so other newbies like me don’t bombard you with questions once you go live. [import]uid: 11904 topic_id: 4457 reply_id: 14548[/import]

Glad it works and yea that is a good idea, I will update the tutorial(s) before release. [import]uid: 5833 topic_id: 4457 reply_id: 14575[/import]

Ok. This beginner finally made it through #3 as well. Please note the following known bug in Tiled which might affect some folks :

http://sourceforge.net/apps/mantisbt/tiled/view.php?id=70

A small caution on this one could also help. Cheers [import]uid: 11904 topic_id: 4457 reply_id: 14580[/import]

Well done for making it through :slight_smile:

And I will also make a note of that too, thanks! [import]uid: 5833 topic_id: 4457 reply_id: 14582[/import]

Both tutorials have now been updated. [import]uid: 5833 topic_id: 4457 reply_id: 14584[/import]

Super. Checked and verified they are now “idiot-proof” even by my standards! Well done. Now onto Tut5… After exported set save I can’t execute any more. Will find it out soon and let you know. [import]uid: 11904 topic_id: 4457 reply_id: 14600[/import]

Ok. I give up. After exporting the tileset as described on Tut5 I’m getting bunch or errors when running the app. Here’s how it goes :

Runtime error
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: bad argument #2 to ‘newSpriteSheet’ (number expected, got nil)
stack traceback:
[C]: ?
[C]: in function ‘newSpriteSheet’
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: in function ‘newTileSet’
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1019: in function ‘load’
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1313: in function <…ht1fraey8qq7vklje>
(tail call): ?
…HShT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/main.lua:20: in main chunk
Runtime error: …hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: bad argument #2 to ‘newSpriteSheet’ (number expected, got nil)
stack traceback:
[C]: ?
[C]: in function ‘newSpriteSheet’
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: in function ‘newTileSet’
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1019: in function ‘load’
…hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1313: in function <…ht1fraey8qq7vklje>
(tail call): ?
…HShT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/main.lua:20: in main chunk

[import]uid: 11904 topic_id: 4457 reply_id: 14604[/import] </…ht1fraey8qq7vklje></…ht1fraey8qq7vklje>

Very strange, the tutorial certainly works with the latest code (unless I have missed out a step by accident), could you please send me your project so I can see what I have done wrong? [import]uid: 5833 topic_id: 4457 reply_id: 14618[/import]

Thanks for your offer to help check this out. You can find my current tutorial project at : http://dl.dropbox.com/u/16928994/LimeTut.zip

I am sure its something idiotic that I’m doing. [import]uid: 11904 topic_id: 4457 reply_id: 14636[/import]

Right, I’ve “solved” the problem. I’m not sure exactly what it is yet but it is definately a Lime bug so well done! Basically to fix it if you import the first tileset back in (right click the tileset in Tiled and choose Import) still leaving the ice one exported it will work.

I will look into why having more than one (or simply the first one) exported causes Lime to implode. [import]uid: 5833 topic_id: 4457 reply_id: 14644[/import]