I'm trying to implement cutscenes for my game using LuaBridge. Right now I'm setting up the Cutscene State, which creates a Lua state, stores it, and loads a script. I'm trying to set the functions up, such as the Cutscene createSprite function.
I'm using this to set up the function:
I'm getting the compiler error:
error: no matching function for call to 'luabridge::FuncTraits<void (Cutscene::*)(function arguments), void (Cutscene::*)(function arguments)>::call(void (Cutscene::* const&)(function arguments), luabridge::ArgList<luabridge::TypeList<function arguments>)
note: candidate expects 3 arguments, 2 provided
It seems the call function it is trying to use takes three parameters: T*, D, and a big list of the types for the parameters. I left out my function arguments as they don't seem to be the problem and it's a big error message to begin with.
I just want to be able to use the member functions of this specific instance of
Cutscene through my Lua script, preferably without having to specify it as a member of Cutscene in the script (eg. I want to be able to call this just using
createSprite("name", "type", u, v, w, h) in Lua.)
Is there any way to do this, or must I send the class over and figure some way to send my current instance of
Cutscene to Lua? It has to be the specific instance as Sprites need to be saved to the
Cutscene in order to access them by name later.