Quando eu vou adicionar esse parâmetro na source luascript.cpp, na hora de compilar da erro
Esse é o parêmetro
int32_t LuaInterface::luaDoGuildAddEnemy(lua_State* L) { //doGuildAddEnemy(guild, enemy, war, type) War_t war; war.type = (WarType_t)popNumber(L); war.war = popNumber(L); uint32_t enemy = popNumber(L), guild = popNumber(L), count = 0; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { if(it->second->isRemoved() || it->second->getGuildId() != guild) continue; ++count; it->second->addEnemy(enemy, war); g_game.updateCreatureEmblem(it->second); } lua_pushnumber(L, count); return 1; } int32_t LuaInterface::luaDoGuildRemoveEnemy(lua_State* L) { //doGuildRemoveEnemy(guild, enemy) uint32_t enemy = popNumber(L), guild = popNumber(L), count = 0; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { if(it->second->isRemoved() || it->second->getGuildId() != guild) continue; ++count; it->second->removeEnemy(enemy); g_game.updateCreatureEmblem(it->second); } lua_pushnumber(L, count); return 1; }
Esse é erro que está dando.
In file included from ../luascript.cpp:18: ../luascript.h:753:7: warning: no newline at end of file In file included from ../player.h:35, from ../luascript.cpp:26: ../ioguild.h:86:7: warning: no newline at end of file ../luascript.cpp:9755: error: `LuaInterface' has not been declared ../luascript.cpp: In function `int32_t luaDoGuildAddEnemy(lua_State*)': ../luascript.cpp:9758: error: `War_t' was not declared in this scope ../luascript.cpp:9758: error: expected `;' before "war" ../luascript.cpp:9759: error: `war' was not declared in this scope ../luascript.cpp:9759: error: `WarType_t' was not declared in this scope ../luascript.cpp:9759: error: expected `;' before "popNumber" ../luascript.cpp:9760: error: `popNumber' was not declared in this scope ../luascript.cpp:9769: error: 'class Player' has no member named 'addEnemy' ../luascript.cpp:9770: error: 'class Game' has no member named 'updateCreatureEmblem' ../luascript.cpp: At global scope: ../luascript.cpp:9777: error: `LuaInterface' has not been declared ../luascript.cpp: In function `int32_t luaDoGuildRemoveEnemy(lua_State*)': ../luascript.cpp:9780: error: `popNumber' was not declared in this scope ../luascript.cpp:9787: error: 'class Player' has no member named 'removeEnemy' ../luascript.cpp:9788: error: 'class Game' has no member named 'updateCreatureEmblem' make.exe: *** [obj//luascript.o] Error 1