• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Luascript.cpp-Item Durability

tetra20

DD
Joined
Jan 17, 2009
Messages
1,315
Solutions
4
Reaction score
323
Location
Egypt
Hi,I am making a new system.It is finished but the last lua script is bugged

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 :)
 
Back
Top