Code: Select all
guiRoot->getChild("Root/AddMiner")->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&GameState::addMiner));
This line produces an error:
Code: Select all
c:\cegui\cegui\include\CEGUIFunctorCopySlot.h(51): error C2064: term does not evaluate to a function taking 1 arguments
Here is the function `GameState::addMiner`:
Code: Select all
void GameState::addMiner(const CEGUI::EventArgs &evt){
player1Mgr->trackUnit(player1Mgr->getFaction()->getMiner());
}
It produces that error, and I've no idea why. please say if you need more details!
Here is the error in its entirety:
Code: Select all
c:\cegui\cegui\include\CEGUIFunctorCopySlot.h(51): error C2064: term does not evaluate to a function taking 1 arguments
1> c:\cegui\cegui\include\CEGUIFunctorCopySlot.h(50) : while compiling class template member function 'bool CEGUI::FunctorCopySlot<T>::operator ()(const CEGUI::EventArgs &)'
1> with
1> [
1> T=void (__thiscall GameState::* )(const CEGUI::EventArgs &)
1> ]
1> c:\cegui\cegui\include\CEGUISubscriberSlot.h(126) : see reference to class template instantiation 'CEGUI::FunctorCopySlot<T>' being compiled
1> with
1> [
1> T=void (__thiscall GameState::* )(const CEGUI::EventArgs &)
1> ]
1> GameState.cpp(40) : see reference to function template instantiation 'CEGUI::SubscriberSlot::SubscriberSlot<void(__thiscall GameState::* )(const CEGUI::EventArgs &)>(const T &)' being compiled
1> with
1> [
1> T=void (__thiscall GameState::* )(const CEGUI::EventArgs &)
1> ]