Hi,I am making a new system.It is finished but the last lua script is bugged
Code:
Error:
Thanks
Code:
Code:
int32_t LuaInterface::luaSetItemDurability(lua_State* L)
{
const ItemType* item;
uint32_t durability = popNumber(L);
ScriptEnviroment* env = getEnv();
if((item = Item::items.getElement(popNumber(L))))
{
item->durability(durability);
lua_pushboolean(L, true);
}else{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}
return 1;
}
Error:
Code:
term does not evaluate to a function taking 1 arguments
Thanks