Ir para conteúdo

Erro Ao Tentar Compilar Tfs


JNLPB

Posts Recomendados

Olá! Estou tentando compilar o TFS 0.3.6 pl1, só que está dando vários e vários erros! Ao clicar em compilar no Dev aparece que está compilando, ao terminar clico para ver o "log do compilador", lá diz que tem 502 erros! Eh estranho, baixei todas as sources, o Dev próprio para compilar o TFS... Já tentei também compilar outras versões, 0.3.1 e 0.3.1 pl2, e ambos n deram certo, aperecia que haviam mais de 200 erros! Alguém pode me ajudar com isso? Não coloquei os erros pois ocupariam muito espaço, mais se alguém quiser vê-los me avise que eu posto. Vlw!

Link para o comentário
Compartilhar em outros sites

Alguns dos erros:

 

 

#innclude "otpch.h"

#include "const.h"

 

#include "actions.h"

#include "tools.h"

 

#include "player.h"

#include "monster.h"

#include "npc.h"

 

#include "item.h"

#include "container.h"

 

#include "game.h"

#include "configmanager.h"

 

#include "combat.h"

#include "spells.h"

 

#include "house.h"

#include "beds.h"

 

#include <libxml/xmlmemory.h>

#include <libxml/parser.h>

 

extern Game g_game;

extern Spells* g_spells;

extern Actions* g_actions;

extern ConfigManager g_config;

 

Actions::Actions():

m_interface("Action Interface")

{

m_interface.initState();

}

 

Actions::~Actions()

{

clear();

}

 

inline void Actions::clearMap(ActionUseMap& map)

{

for(ActionUseMap::iterator it = map.begin(); it != map.end(); ++it)

delete it->second;

 

map.clear();

}

 

void Actions::clear()

{

clearMap(useItemMap);

clearMap(uniqueItemMap);

clearMap(actionItemMap);

 

m_interface.reInitState();

}

 

Event* Actions::getEvent(const std::string& nodeName)

{

if(asLowerCaseString(nodeName) == "action")

return new Action(&m_interface);

 

return NULL;

}

 

bool Actions::registerEvent(Event* event, xmlNodePtr p, bool override)

{

Action* action = dynamic_cast<Action*>(event);

if(!action)

return false;

 

StringVec strVector;

IntegerVec intVector, endIntVector;

 

std::string strValue, endStrValue;

int32_t tmp = 0;

 

bool success = true;

if(readXMLString(p, "itemid", strValue))

{

if(!parseIntegerVec(strValue, intVector))

{

std::cout << "[Warning - Actions::registerEvent] Invalid itemid - '" << strValue << "'" << std::endl;

return false;

}

 

if(useItemMap.find(intVector[0]) != useItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item id: " << intVector[0] << std::endl;

success = false;

}

else

delete useItemMap[intVector[0]];

}

 

if(success)

useItemMap[intVector[0]] = action;

 

for(size_t i = 1, size = intVector.size(); i < size; ++i)

{

if(useItemMap.find(intVector) != useItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item id: " << intVector << std::endl;

continue;

}

else

delete useItemMap[intVector];

}

 

useItemMap[intVector] = new Action(action);

}

}

 

if(readXMLString(p, "fromid", strValue) && readXMLString(p, "toid", endStrValue))

{

intVector = vectorAtoi(explodeString(strValue, ";"));

endIntVector = vectorAtoi(explodeString(endStrValue, ";"));

if(intVector[0] && endIntVector[0] && intVector.size() == endIntVector.size())

{

for(size_t i = 0, size = intVector.size(); i < size; ++i)

{

tmp = intVector;

while(intVector <= endIntVector)

{

if(useItemMap.find(intVector) != useItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item with id: " << intVector <<

", in fromid: " << tmp << " and toid: " << endIntVector << std::endl;

intVector++;

continue;

}

else

delete useItemMap[intVector];

}

 

useItemMap[intVector++] = new Action(action);

}

}

}

else

std::cout << "[Warning - Actions::registerEvent] Malformed entry (from item: \"" << strValue <<

"\", to item: \"" << endStrValue << "\")" << std::endl;

}

 

if(readXMLString(p, "uniqueid", strValue))

{

if(!parseIntegerVec(strValue, intVector))

{

std::cout << "[Warning - Actions::registerEvent] Invalid uniqueid - '" << strValue << "'" << std::endl;

return false;

}

 

if(uniqueItemMap.find(intVector[0]) != uniqueItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item uid: " << intVector[0] << std::endl;

success = false;

}

else

delete uniqueItemMap[intVector[0]];

}

 

if(success)

uniqueItemMap[intVector[0]] = action;

 

for(size_t i = 1, size = intVector.size(); i < size; ++i)

{

if(uniqueItemMap.find(intVector) != uniqueItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item uid: " << intVector << std::endl;

continue;

}

else

delete uniqueItemMap[intVector];

}

 

uniqueItemMap[intVector] = new Action(action);

}

}

 

if(readXMLString(p, "fromuid", strValue) && readXMLString(p, "touid", endStrValue))

{

intVector = vectorAtoi(explodeString(strValue, ";"));

endIntVector = vectorAtoi(explodeString(endStrValue, ";"));

if(intVector[0] && endIntVector[0] && intVector.size() == endIntVector.size())

{

for(size_t i = 0, size = intVector.size(); i < size; ++i)

{

tmp = intVector;

while(intVector <= endIntVector)

{

if(uniqueItemMap.find(intVector) != uniqueItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item with uid: " << intVector <<

", in fromuid: " << tmp << " and touid: " << endIntVector << std::endl;

intVector++;

continue;

}

else

delete uniqueItemMap[intVector];

}

 

uniqueItemMap[intVector++] = new Action(action);

}

}

}

else

std::cout << "[Warning - Actions::registerEvent] Malformed entry (from unique: \"" << strValue <<

"\", to unique: \"" << endStrValue << "\")" << std::endl;

}

 

if(readXMLString(p, "actionid", strValue))

{

if(!parseIntegerVec(strValue, intVector))

{

std::cout << "[Warning - Actions::registerEvent] Invalid actionid - '" << strValue << "'" << std::endl;

return false;

}

 

if(actionItemMap.find(intVector[0]) != actionItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item aid: " << intVector[0] << std::endl;

success = false;

}

else

delete actionItemMap[intVector[0]];

}

 

if(success)

actionItemMap[intVector[0]] = action;

 

for(size_t i = 1, size = intVector.size(); i < size; ++i)

{

if(actionItemMap.find(intVector) != actionItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item aid: " << intVector << std::endl;

continue;

}

else

delete actionItemMap[intVector];

}

 

actionItemMap[intVector] = new Action(action);

}

}

 

if(readXMLString(p, "fromaid", strValue) && readXMLString(p, "toaid", endStrValue))

{

intVector = vectorAtoi(explodeString(strValue, ";"));

endIntVector = vectorAtoi(explodeString(endStrValue, ";"));

if(intVector[0] && endIntVector[0] && intVector.size() == endIntVector.size())

{

for(size_t i = 0, size = intVector.size(); i < size; ++i)

{

tmp = intVector;

while(intVector <= endIntVector)

{

if(actionItemMap.find(intVector) != actionItemMap.end())

{

if(!override)

{

std::cout << "[Warning - Actions::registerEvent] Duplicate registered item with aid: " << intVector <<

", in fromaid: " << tmp << " and toaid: " << endIntVector << std::endl;

intVector++;

continue;

}

else

delete actionItemMap[intVector];

}

 

actionItemMap[intVector++] = new Action(action);

}

}

}

else

std::cout << "[Warning - Actions::registerEvent] Malformed entry (from action: \"" << strValue <<

"\", to action: \"" << endStrValue << "\")" << std::endl;

}

 

return success;

}

 

ReturnValue Actions::canUse(const Player* player, const Position& pos)

{

const Position& playerPos = player->getPosition();

if(pos.x == 0xFFFF)

return RET_NOERROR;

 

if(playerPos.z > pos.z)

return RET_FIRSTGOUPSTAIRS;

 

if(playerPos.z < pos.z)

return RET_FIRSTGODOWNSTAIRS;

 

if(!Position::areInRange<1,1,0>(playerPos, pos))

return RET_TOOFARAWAY;

 

return RET_NOERROR;

}

 

ReturnValue Actions::canUse(const Player* player, const Position& pos, const Item* item)

{

Action* action = NULL;

if((action = getAction(item, ACTION_UNIQUEID)))

return action->canExecuteAction(player, pos);

 

if((action = getAction(item, ACTION_ACTIONID)))

return action->canExecuteAction(player, pos);

 

if((action = getAction(item, ACTION_ITEMID)))

return action->canExecuteAction(player, pos);

 

if((action = getAction(item, ACTION_RUNEID)))

return action->canExecuteAction(player, pos);

 

return RET_NOERROR;

 

 

Ninguém faz idéia do que está acontecendo?

Editado por JNLPB
Link para o comentário
Compartilhar em outros sites

  • 1 year later...
  • 1 month later...
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...