help please, saying pointer is undeclared when it was!!??
Posted: Fri Dec 21, 2007 6:54 am
Hi again, sorry but I need help again. For somereason, the compiler is saying that a pointer/variable (not sure), is undeclared, but was obviously declared before it. Are there any reasons why it would do that?(other than misspelling ).Sorry, its in middle of a if statement, but heres the code:
the compiler gives an error at the decaration of anim saying that 'selector' is undeclared. Please help, any suggestions, help is appreciated. thanks in advance,
Ken
Code: Select all
//get a mesh from name
IMesh* roommesh = smgr->getMesh(roommesh_name.c_str())->getMesh(0);
ITriangleSelector* selector = smgr->createOctTreeTriangleSelector( roommesh,roommesh_node,128);
roommesh_node->setTriangleSelector(selector);
selector->drop();
}
}
//camera( in the scene)
ICameraSceneNode* cam = (ICameraSceneNode*)smgr->getSceneNodeFromName("cam_player");
//camera
ICameraSceneNode* cam1 = smgr->addCameraSceneNodeFPS();
cam1->setPosition(vector3df(0.0f,0.0f,100.0f));
ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(selector,cam1,vector3df(30,50,30),
vector3df(0,-3,0),//(o,-3,0)
vector3df(0,50,0));
cam1->addAnimator(anim);
anim->drop();
Ken