eduardbean
Member
- Joined
- Nov 26, 2010
- Messages
- 129
- Solutions
- 2
- Reaction score
- 15
Good morning, I'm doing a new class called "Pokeball" that inherits the "Item" class.
But I'm having trouble binding the class to use it in LUA, I can not send the metatable to use the functions in Lua.
When i try to do this :
I got this:
print(pokeball) return userdata
but table.dump return empty
and setLevel is null
Here's the diff of what I changed on the server to try to make my new class, could someone point me to what I'm doing wrong or what's missing ??
[Diff] Pokeball System - Pastebin.com
But I'm having trouble binding the class to use it in LUA, I can not send the metatable to use the functions in Lua.
When i try to do this :
Code:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local pokeball = Pokeball(item.uid)
print(pokeball)
print("--")
table.dump(getmetatable(pokeball))
print("--")
pokeball:setLevel(10)
return true
end
print(pokeball) return userdata
but table.dump return empty
and setLevel is null
Here's the diff of what I changed on the server to try to make my new class, could someone point me to what I'm doing wrong or what's missing ??
[Diff] Pokeball System - Pastebin.com
Last edited: