• 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 LuaInterface Implamentation Function issue

Stellow

C++/C#/PHP/LUA
Joined
Oct 23, 2008
Messages
1,106
Reaction score
214
Location
Germany
GitHub
eubrunomiguel
Code:
int LuaScriptInterface::luaSetPartySharedExperience(lua_State *L)
{
    std::cout << "1" << std::endl;
    //luaSetPartySharedExperience(cid)
   
    //getPartyMembers(cid)
    uint32_t cid = popNumber(L);

    ScriptEnviroment* env = getScriptEnv();

    Creature* creature = env->getCreatureByUID(cid);
    if(!creature){
        reportErrorFunc(getErrorDesc(LUA_ERROR_CREATURE_NOT_FOUND));
        lua_pushboolean(L, false);
        return 1;
    }
    std::cout << "2" << std::endl;

    Player* player = creature->getPlayer();
    if(!player){
        reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
        lua_pushboolean(L, false);
        return 1;
    }

    std::cout << "3" << std::endl;

    if(!player->getParty()){
        lua_pushnil(L);
        return 1;
    }

    std::cout << "4" << std::endl;
    player->getParty()->setSharedExperience(player, true);
    return 1;
}


Its saying:
LuaScriptInterface::LuaSetPartySharedExperience (). Creature not found
 
Back
Top