buzzy
June 7, 2012, 2:01pm
#1
Hello, i have created some forms in a.tmx file. It works fluently on cocos2d, but not in cocos2d-x. It gets an error when i compile it although i have this file in my resources. I initialize it this way:
tileMapNode = CCTMXTiledMap::tiledMapWithTMXFile("a.tmx");
Maybe someone has a solution to this? Thank you.
walzer
June 9, 2012, 9:11am
#2
You should assign a category of the post. Which platform did you met this problem, ios or android?
walzer
June 9, 2012, 3:10pm
#4
Have you noticed the difference between reference and creating folder in xcode? one the blue folder, another is yellow. They’re different.
buzzy
June 10, 2012, 10:29am
#5
I’m not completely following what do mean. All the folders in Xcode are yellow. And Resources folder is also yellow.
bool CCTextureAtlas::initWithTexture(CCTexture2D *texture, unsigned int capacity)
{
CCAssert(texture != NULL, “texture should not be null”);
……
}
this the place where it crashes.
walzer
June 10, 2012, 12:02pm
#6
Well, the program cannot find your texture.
Have you packed the image with tmx file, in the same folder?
e.g. in a.tmx file
You need to pack iso-test.png together with a.tmx.
buzzy
June 10, 2012, 12:25pm
#7
yup, there is a png picture in the same folder as a.tmx. I’m confused. tileset is good, pointing to a picture in the same folder.
buzzy
June 10, 2012, 12:44pm
#8
Found the problem. Tileset can’t be empty, that’s where the error come from. Difference - on cocos2d you can load empty tile set.