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

Błąd podczas kompilacji Ubuntu..

Status
Not open for further replies.
Że już tak powiem jeb*e mnie to. Jak tak bardzo lubisz donatora to idź i kup a nie kurw* mi będziesz dupe smencił ...
Co ma donator do pie*rzonej kompilacji ? Jak bym założył temat z pytanie " co oznacza ten błąd ..." to by nie było pytań co to za silnik, tylko by ktoś mi powiedział, co oznacza dany błąd, nie ? -_-

Ponawiam pytanie z postu #13
zignoruj n00ba...
 
;) Dalej czekam na podpowiedź od kogoś co znaczy ten błąd i jak go mogę naprawić ;/
 
Udało mi się jakoś chbya pominąc tamten błąd, widocznie najnowsza wersja ubuntu jest zła, lecz po zmianie na starszą, dalej nie mogę skompilować:
Code:
monster.cpp: In member function ‘virtual void Monster::doAttacking(uint32_t)’:
monster.cpp:626:26: error: variable ‘outOfRange’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

Code:
void Monster::doAttacking(uint32_t interval)
{
	if(!attackedCreature || (isSummon() && attackedCreature == this))
		return;

	bool updateLook = true, outOfRange = true;
	resetTicks = interval;
	attackTicks += interval;

	const Position& myPos = getPosition();
	for(SpellList::iterator it = mType->spellAttackList.begin(); it != mType->spellAttackList.end(); ++it)
	{
		if(!attackedCreature || attackedCreature->isRemoved())
			break;

		const Position& targetPos = attackedCreature->getPosition();
		if(it->isMelee && isFleeing())
			continue;

		bool inRange = false;
		if(canUseSpell(myPos, targetPos, *it, interval, inRange))
		{
			if(it->chance >= (uint32_t)random_range(1, 100))
			{
				if(updateLook)
				{
					updateLookDirection();
					updateLook = false;
				}

				double multiplier;
				if(maxCombatValue > 0) //defense
					multiplier = g_config.getDouble(ConfigManager::RATE_MONSTER_DEFENSE);
				else //attack
					multiplier = g_config.getDouble(ConfigManager::RATE_MONSTER_ATTACK);

				minCombatValue = (int32_t)(it->minCombatValue * multiplier);
				maxCombatValue = (int32_t)(it->maxCombatValue * multiplier);

				it->spell->castSpell(this, attackedCreature);
				if(it->isMelee)
					extraMeleeAttack = false;
#ifdef __DEBUG__

				static uint64_t prevTicks = OTSYS_TIME();
				std::clog << "doAttacking ticks: " << OTSYS_TIME() - prevTicks << std::endl;
				prevTicks = OTSYS_TIME();
#endif
			}
		}

		if(inRange)
			outOfRange = false;
		else if(it->isMelee) //melee swing out of reach
			extraMeleeAttack = true;
	}

	if(updateLook)
		updateLookDirection();

	if(resetTicks)
		attackTicks = 0;
}

A to jest linijka 626:
Code:
bool updateLook = true, outOfRange = true;
Jakieś pomysły ? :P
 
PHP:
void Monster::doAttacking(uint32_t interval)
{
	if(!attackedCreature || (isSummon() && attackedCreature == this))
		return;

	bool updateLook = true;
	resetTicks = interval;
	attackTicks += interval;

	const Position& myPos = getPosition();
	for(SpellList::iterator it = mType->spellAttackList.begin(); it != mType->spellAttackList.end(); ++it)
	{
		if(!attackedCreature || attackedCreature->isRemoved())
			break;

		const Position& targetPos = attackedCreature->getPosition();
		if(it->isMelee && isFleeing())
			continue;

		bool inRange = false;
		if(canUseSpell(myPos, targetPos, *it, interval, inRange))
		{
			if(it->chance >= (uint32_t)random_range(1, 100))
			{
				if(updateLook)
				{
					updateLookDirection();
					updateLook = false;
				}

				double multiplier;
				if(maxCombatValue > 0) //defense
					multiplier = g_config.getDouble(ConfigManager::RATE_MONSTER_DEFENSE);
				else //attack
					multiplier = g_config.getDouble(ConfigManager::RATE_MONSTER_ATTACK);

				minCombatValue = (int32_t)(it->minCombatValue * multiplier);
				maxCombatValue = (int32_t)(it->maxCombatValue * multiplier);

				it->spell->castSpell(this, attackedCreature);
				if(it->isMelee)
					extraMeleeAttack = false;
#ifdef __DEBUG__

				static uint64_t prevTicks = OTSYS_TIME();
				std::clog << "doAttacking ticks: " << OTSYS_TIME() - prevTicks << std::endl;
				prevTicks = OTSYS_TIME();
#endif
			}
		}

		else if(it->isMelee) //melee swing out of reach
			extraMeleeAttack = true;
	}

	if(updateLook)
		updateLookDirection();

	if(resetTicks)
		attackTicks = 0;
}
 
Acha, czyli po prostu ta linijka w kodzie była tak jak by zbędna bo nic z niej nie korzystało (z tej funkcji czy co to tam było) A jak mogę zmienić, żeby ostrzeżenia przechodziły dalej (bo one chyba nie wpływają na pracę silnika)
 
Acha, czyli po prostu ta linijka w kodzie była tak jak by zbędna bo nic z niej nie korzystało (z tej funkcji czy co to tam było) A jak mogę zmienić, żeby ostrzeżenia przechodziły dalej (bo one chyba nie wpływają na pracę silnika)
Nie ma wpływu, ale zbędny kod ci nie jest potrzebny - po co ustawiać zmienną lokalną, której zmienisz wartość - a później nie przekażesz dane? Takie masło maślane, lepiej od razu usunąć.
 
In file included from /usr/include/boost/filesystem/v3/config.hpp:29:0,
from /usr/include/boost/filesystem.hpp:34,
from luascript.cpp:21:
/usr/include/boost/system/api_config.hpp:28:5: error: #error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported
make[1]: *** [luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/monster.Tpo .deps/monster.Po
mv -f .deps/monsters.Tpo .deps/monsters.Po
make[1]: Leaving directory `/home/administrator/OTS/trunk.r3884'
make: *** [all] Error 2
root@GAMER:/home/administrator/OTS/trunk.r3884#

wie ktoś coś?
 
Status
Not open for further replies.
Back
Top