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

C++ you may not cast area spells while you have a black skull

ismael jr91

New Member
Joined
May 28, 2016
Messages
91
Reaction score
4
anyone can help me with this error ??

i dont use any spell 'exevo gran mas vis' 'mas pox' etc... greatfire ball rune.. anyone can help me ?

"you may not cast area spells while you have a black skull"
 
anyone can help me with this error ??

i dont use any spell 'exevo gran mas vis' 'mas pox' etc... greatfire ball rune.. anyone can help me ?

"you may not cast area spells while you have a black skull"
Untested, it compiles but i don't know if it will work.
C++:
bool CombatSpell::executeCastSpell(Creature* creature, const LuaVariant& var)
{
    //onCastSpell(creature, var)
    if (!scriptInterface->reserveScriptEnv()) {
        std::cout << "[Error - CombatSpell::executeCastSpell] Call stack overflow" << std::endl;
        return false;
    }

    if (const Player* player = creature->getPlayer()) {
        if (player->getSkull() == SKULL_BLACK && !needTarget) {
            player->sendTextMessage(MESSAGE_INFO_DESCR, "You may not cast area spells while you have a black skull.");
            return false;
        }
    }

    ScriptEnvironment* env = scriptInterface->getScriptEnv();
    env->setScriptId(scriptId, scriptInterface);

    lua_State* L = scriptInterface->getLuaState();

    scriptInterface->pushFunction(scriptId);

    LuaScriptInterface::pushUserdata<Creature>(L, creature);
    LuaScriptInterface::setCreatureMetatable(L, -1, creature);

    LuaScriptInterface::pushVariant(L, var);

    return scriptInterface->callFunction(2);
}
 
I do not know what line I make the change they ask for

Severity Code Description Project File Line Suppression State
Error C2601 'Monster::convinceCreature': local function definitions are illegal TheOTXServer C:\Users\ismae\Desktop\sources\monster.cpp 1504

Severity Code Description Project File Line Suppression State
Error C1075 the left brace '{' was unmatched at the end of the file TheOTXServer C:\Users\ismae\Desktop\sources\monster.cpp 1510


Severity Code Description Project File Line Suppression State
Error C2059 syntax error: 'if' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2050

Severity Code Description Project File Line Suppression State
Error C2143 syntax error: missing ';' before '{' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2050

Severity Code Description Project File Line Suppression State
Error C2447 '{': missing function header (old-style formal list?) TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2050

Severity Code Description Project File Line Suppression State
Error C2059 syntax error: 'if' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2055

Severity Code Description Project File Line Suppression State
Error C2143 syntax error: missing ';' before '{' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2055

Severity Code Description Project File Line Suppression State
Error C2447 '{': missing function header (old-style formal list?) TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2055

this is my erros for compiling now
 
Last edited by a moderator:
Severity Code Description Project File Line Suppression State
Error C2601 'Monster::convinceCreature': local function definitions are illegal TheOTXServer C:\Users\ismae\Desktop\sources\monster.cpp 1504

Severity Code Description Project File Line Suppression State
Error C1075 the left brace '{' was unmatched at the end of the file TheOTXServer C:\Users\ismae\Desktop\sources\monster.cpp 1510


Severity Code Description Project File Line Suppression State
Error C2059 syntax error: 'if' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2050

Severity Code Description Project File Line Suppression State
Error C2143 syntax error: missing ';' before '{' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2050

Severity Code Description Project File Line Suppression State
Error C2447 '{': missing function header (old-style formal list?) TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2050

Severity Code Description Project File Line Suppression State
Error C2059 syntax error: 'if' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2055

Severity Code Description Project File Line Suppression State
Error C2143 syntax error: missing ';' before '{' TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2055

Severity Code Description Project File Line Suppression State
Error C2447 '{': missing function header (old-style formal list?) TheOTXServer C:\Users\ismae\Desktop\sources\spells.cpp 2055

this is my erros for compiling now
There is one "{" more or less. If you open bracket you have to close it.
something {
}
 
}
if (aggressive && (range < 1 || (range > 0 && !player->getAttackedCreature())) && player->getSkull() == SKULL_BLACK) {
player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
return false;
}


in which line can I add this ???
 
Back
Top