Hi, I wanted to add autobalance teams from gesiorwar 8.2 server. I use TFS 0.2pl23. I've copied all codes. The error I get when compile:
Part of game.cpp where the error occurs:
Nothing that I tried worked, I even removed the addCreatureCheck and then it compiled correctly and autobalance worked but addCreatureCheck is needed so what can I do to fix this error? Please help!
Code:
725 C:\Documents and Settings\xxr\Pulpit\0.2pl23\game.cpp expected constructor, destructor, or type conversion before '(' token
726 C:\Documents and Settings\xxr\Pulpit\0.2pl23\game.cpp expected constructor, destructor, or type conversion before '->' token
727 C:\Documents and Settings\xxr\Pulpit\0.2pl23\game.cpp expected unqualified-id before "return"
728 C:\Documents and Settings\xxr\Pulpit\0.2pl23\game.cpp expected declaration before '}' token
C:\Documents and Settings\xxr\Pulpit\tfsab\Makefile.win [Build Error] [../0.2pl23/game.o] Error 1
Part of game.cpp where the error occurs:
Code:
if(player->isPremium())
{
int32_t value;
player->getStorageValue(STORAGEVALUE_PROMOTION, value);
if(player->isPromoted() && value != 1)
player->addStorageValue(STORAGEVALUE_PROMOTION, 1);
else if(!player->isPromoted() && value == 1)
player->setVocation(g_vocations.getPromotedVocation(player->getVocationId()));
}
else if(player->isPromoted())
player->setVocation(player->vocation->getFromVocation());
}
if(player->getAccount() == 1)
addTeam1Player();
else if(player->getAccount() == 2)
addTeam2Player();
}
[COLOR=RED] addCreatureCheck(creature);[/COLOR]
creature->onPlacedCreature();
return true;
}
bool Game::removeCreature(Creature* creature, bool isLogout /*= true*/)
{
if(creature->isRemoved())
return false;
Nothing that I tried worked, I even removed the addCreatureCheck and then it compiled correctly and autobalance worked but addCreatureCheck is needed so what can I do to fix this error? Please help!