I'm following this amazing tutorial about implementing tilemaps in my game http://www.raywenderlich.com/39113/cocos2d-x-tile-map-tutorial-part-1
http://www.raywenderlich.com/40544/cocos2d-x-tile-map-tutorial-part-2
But when i get to this:
CCTMXObjectGroup *objectGroup = _tileMap->objectGroupNamed("Objects");
if(objectGroup == NULL){
CCLog("tile map has no objects object layer");
return false;
}
CCDictionary *spawnPoint = objectGroup->objectNamed("SpawnPoint");
int x = ((CCString)*spawnPoint->valueForKey("x")).intValue();
int y = ((CCString)*spawnPoint->valueForKey("y")).intValue();
_player = new CCSprite();
_player->initWithFile("Player.png");
_player->setPosition(ccp(x,y));
this->addChild(_player);
this->setViewPointCenter(_player->getPosition());
I get an error on: CCDictionary *spawnPoint = objectGroup->objectNamed("SpawnPoint");
Stating that there is no function to convert this objectGroup. (error no suitable conversion function from Cocos2d::Valuemap to Cocos2d::CCdictionary existis)
This looks like a problem from the diferents cocos' versions used (The tutorial is v2 and i'm v3).
Does anyone knows how to fix this?