Ir para conteúdo

Featured Replies

Postado

Bom pessoal, há um tempo vi um cara aqui no tk postando que queria um sistema que quando o player estivesse com um "Secure Mode" ativado, nenhuma magia de area q o player solta acerta outros players, ou seja, impede de adquirir PK. Então, alguem o ajudou compartilhando um link de um tópico do otland com uns códigos para adicionar na source, eu fui atrás, peguei o código, coloquei no lugar certo e tal, só que na compilação da erro. Segue o erro e os códigos:

 

 

Erro na compilação:

1>..\luascript.cpp(2928): error C2653: 'LuaScriptInterface' : is not a class or namespace name
1>..\luascript.cpp(2931): error C3861: 'getEnv': identifier not found
1>..\luascript.cpp(2932): error C3861: 'popNumber': identifier not found
1>..\luascript.cpp(2935): error C3861: 'error': identifier not found
1>..\luascript.cpp(2935): error C3861: 'getError': identifier not found
1>..\luascript.cpp(2944): error C2653: 'LuaScriptInterface' : is not a class or namespace name
1>..\luascript.cpp(2947): error C3861: 'getEnv': identifier not found
1>..\luascript.cpp(2948): error C3861: 'popNumber': identifier not found
1>..\luascript.cpp(2951): error C3861: 'error': identifier not found
1>..\luascript.cpp(2951): error C3861: 'getError': identifier not found

 

 

luascript.cpp

int32_t LuaScriptInterface::luaGetPlayerSecureMode(lua_State* L)
{
    //getPlayerSecureMode(cid)
    ScriptEnviroment* env = getEnv();
    Player* player = env->getPlayerByUID((uint32_t)popNumber(L));
    if(!player)
    {
        errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
        lua_pushboolean(L, false);
    }
    else
        lua_pushnumber(L, player->getSecureMode());
 
    return 1;
}

int32_t LuaScriptInterface::luaGetPlayerFightMode(lua_State* L)
{
    //getPlayerFightMode(cid)
    ScriptEnviroment* env = getEnv();
    Player* player = env->getPlayerByUID((uint32_t)popNumber(L));
    if(!player)
    {
        errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
        lua_pushboolean(L, false);
    }
    else
        lua_pushnumber(L, player->getAttackFactor());
 
    return 1;
}

 

 

luascript.h

//getPlayerFightMode(cid)
static int32_t luaGetPlayerFightMode(lua_State* L);
//getPlayerSecureMode(cid)
static int32_t luaGetPlayerSecureMode(lua_State* L);

 

Realmente me interessei pelo sistema, e gostaria de saber se alguem poderia me ajudar ^^ obrigado

Resolvido por Fir3element

Ir para solução

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo