Skip to content

Instantly share code, notes, and snippets.

@Twinklebear
Created August 23, 2012 21:03
Show Gist options
  • Select an option

  • Save Twinklebear/3441702 to your computer and use it in GitHub Desktop.

Select an option

Save Twinklebear/3441702 to your computer and use it in GitHub Desktop.
1>c:\users\will\documents\programs\lpcgame\src\input.cpp(286): error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'bool (__thiscall Input::* )(std::string)'
1> None of the functions with this name in scope match the target type
1>c:\users\will\documents\programs\lpcgame\src\input.cpp(286): error C2780: 'luabind::scope luabind::def(const char *,F,const Policies &)' : expects 3 arguments - 2 provided
1> c:\luabind\luabind\function.hpp(47) : see declaration of 'luabind::def'
1>c:\users\will\documents\programs\lpcgame\src\input.cpp(287): error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'bool (__thiscall Input::* )(int)'
1> None of the functions with this name in scope match the target type
1>c:\users\will\documents\programs\lpcgame\src\input.cpp(287): error C2780: 'luabind::scope luabind::def(const char *,F,const Policies &)' : expects 3 arguments - 2 provided
1> c:\luabind\luabind\function.hpp(47) : see declaration of 'luabind::def'
1>c:\users\will\documents\programs\lpcgame\src\input.cpp(291): error C2228: left of '.enum_' must have class/struct/union
void Input::RegisterLua(lua_State* l){
using namespace luabind;
module(l, "LPC")[
class_<Input>("Input")
.scope[
def("KeyDown", (bool(Input::*)(std::string))&Input::KeyDown),
def("KeyDown", (bool(Input::*)(int))&Input::KeyDown),
def("Quit", &Input::Quit)
]
];
}
/**
* Check if a key is being pressed down
* @param keyCode The string of the key to check, ex: 'a'
* @return T if key is down
*/
static bool KeyDown(std::string keyCode);
/**
* Check if a key is being pressed down
* @param keyCode The SDL_SCANCODE of the key
* @return T if key is down
*/
static bool KeyDown(int keyCode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment