• 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!

doSaveHouses() this works?

tatu hunter

Insane Mind~
Joined
Jun 6, 2007
Messages
354
Reaction score
23
Location
Itaporã, Brazil
I didnt tested it, but I want to know if it will work:

luascript.h
PHP:
static int32_t luaDoSaveHouses(lua_State* L);

luascript.cpp
PHP:
//doSaveHouses()
lua_register(m_luaState, "doSaveHouses", LuaInterface::luaDoSaveHouses);

int32_t LuaInterface::luaDoSaveHouses(lua_State* L)
{
    IOMapSerialize* IOLoader = IOMapSerialize::getInstance();
    
    bool saved = false;
    for(uint32_t tries = 0; tries < 3; ++tries)
    {
        if(!IOLoader->saveHouses())
            continue;

        saved = true;
        break;
    }

    return saved;
}
 
Back
Top