Hello again , today I come to ask that serious possible way again activate the " setTeamToBattleTeam " . It is that modules that were used for this function were separated for battleserver . I still think that somehow must be able to reuse. I hope I draw from my doubt and greetings . This is the function: void ScriptEngine::setTeamToBattleTeam(int pid, int teamSlot, int battleId) { if (!testTeamCount("setTeamToBattleTeam", pid, teamSlot)) { return; } BattleBase * battle = myserver->getBattle(battleId); if (battle) { if (battle->spot(pid) == -1) { warn("setTeamToBattleTeam", QString("Player %1 doesn't take part in battle %2").arg(pid, battleId)); return; } TeamBattle team = battle->team(battle->spot(pid)); team.resetIndexes(); myserver->player(pid)->team(teamSlot) = team; } else{ warn("setTeamToBattleTeam", "can't find a battle with specified id."); } }