Hi I am trying to add a sprite to a dictionary and I keep getting this error “this dictionary doesn’t use string as key.” my code is below.
CCSprite* sprite1 = GraphicUtil::makeSpriteWithGraphic("MMButton.png");
sprite2->cocos2d::CCNode::setPosition((X/2), (Y/4));
sprite1->setAnchorPoint(ccp(0.5, 0.5));
sprite1->setTag(1);
CCDictionary* allsprites;
allsprites->setObject((CCObject*)sprite1, "1");
Can anyone see what I am doing wrong?