oen432
Legendary OT User
Hi,
What's the proper and best way to call C++ functions and mostly class methods from Lua side?
Example
What I'm struggling with right now are parameters. InGame Terminal is overflown with errors about casting. What am I missing? How to get this done?
What's the proper and best way to call C++ functions and mostly class methods from Lua side?
Example
C++:
void LocalPlayer::doStuff(Position& _position, uint16 _number, bool _alive)
{
// Code here
}
Lua:
function localPlayerStuff()
pos = { x = 123, y = 123, z = 7 }
number = 123
alive = true
g_game.getLocalPlayer().doStuff(pos, number, alive)
end
What I'm struggling with right now are parameters. InGame Terminal is overflown with errors about casting. What am I missing? How to get this done?
Last edited: