module ( pScriptManager->GetLuaState ( ) )
[
class_<CUnit, CEntity>("CUnit")
.def(constructor<int>())
.def("SetHitPoints", &CUnit::SetHitPoints )
.def("SetInitiative", &CUnit::SetInitiative )
.def("SetMovementRate", &CUnit::SetHitPoints )
.def("SetXPos", &CUnit::SetX )
];
Attempting to export CUnit::SetX produces the above errors...
Any help?
Thanks!
-gf
LUABind: Exporting Derived Classes
Having a bit of trouble with this one as well.
I have a class CUnit that Derives from CEntity. While exportting methods that CUnit derives from CEnity i get lots of errors:
c:\Programming\lib\luabind\luabind\class.hpp(229): error C2782: 'int luabind::detail::call(R (__thiscall T::* )(A0) const,T *,lua_State *,const Policies *)' : template parameter 'T' is ambiguous
c:\Programming\lib\luabind\luabind\class.hpp(229): error C2782: 'int luabind::detail::call(R (__thiscall T::* )(A0),T *,lua_State *,const Policies *)' : template parameter 'T' is ambiguous
c:\Programming\lib\luabind\luabind\class.hpp(229): error C2784: 'int luabind::detail::call(R (__cdecl *)(const T &,A0),T *,lua_State *,const Policies *)' : could not deduce template argument for 'T3 (__cdecl *)(const T1 &,T4)' from 'void (__thiscall CEntity::* )(float)'
c:\Programming\lib\luabind\luabind\class.hpp(229): error C2784: 'int luabind::detail::call(R (__cdecl *)(const T &),T *,lua_State *,const Policies *)' : could not deduce template argument for 'T3 (__cdecl *)(const T1 &)' from 'void (__thiscall CEntity::* )(float)'
c:\Programming\lib\luabind\luabind\class.hpp(229): error C2784: 'int luabind::detail::call(R (__cdecl *)(const T &,A0,A1),T *,lua_State *,const Policies *)' : could not deduce template argument for 'T3 (__cdecl *)(const T1 &,T4,T5)' from 'void (__thiscall CEntity::* )(float)'
c:\Programming\lib\luabind\luabind\class.hpp(229): error C2784: 'int luabind::detail::call(R (__cdecl *)(const T &,A0,A1,A2),T *,lua_State *,const Policies *)' : could not deduce template argument for 'T3 (__cdecl *)(const T1 &,T4,T5,T6)' from 'void (__thiscall CEntity::* )(float)'
... and on and on.
In this case i have a function SetXPos() in CEntity that CUnit derives. I try and export the method like so:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement