Hello, I’m using Berry to apply Tiled maps in Corona SDK. I was following the manual when this error came up:
attempt to call method ‘getObjectLayer’ (a nil value).
I went into berry.lua to check and I did not find any function called ‘getObjectLayer’, there are two similar ones called respectively ‘getLayer’ and ‘getObject’. Should I use one of these two or I just didn’t understand the manual?
While writing local layer = map:getObjectLayer( ‘Object Layer 1’ ) I put the name of the object layer that I was using in the code (called “game”, therefore getObjectLayer(‘game’), right?)
Map:getObjectLayer
got removed in this commit, which made some big changes to Berry:
I think indeed you should just use Map:getLayer
now. Is there an outdated manual somewhere? Probably @ldurniat would be interested to know about it.
Yes, Map:getLayer
searches for the layer by name:
Thanks for the quick answer.
I think he knows already, since in the wiki for the github repository (https://github.com/ldurniat/Berry/wiki) he states that it is indeed out of date. I just wanted to check if that was indeed one of the changes.