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

REPORT ALL 0.2 BUGS HERE (latest 0.2 svn)!

Status
Not open for further replies.
Oh gosh, so you think this will take too long to get fixed?? It's complicated? or its that people still don't know where is the bug?
 
weapons.cpp, around line 500:

Code:
		else if(item->hasCharges())
		{
			int32_t newCharge = std::max(0, item->getItemCharge() - 1);
			g_game.transformItem(item, item->getID(), newCharge);
		}
Remove it, or somehow change. Else, melee weapons lose two charges by one hit.
 
add commands save in next version
save in hours is suux serv can crash and all acc back much time in min is more rooxx
 
Hey! Remere made a patch for the high cpu usage bug, but it's for Avesta.

Attached the patch to the post. (You can apply [to Avesta] unzipping, right-click->Merge Patch with Tortoise SVN)
 

Attachments

Last edited:
I've patched this to my TFS, and seems it works.
Till now no bugs or lags, but its night here, so we'll see tomorrow when server will handle around 60 players.

Another bug: !createguild crashes the server (missing #include "ioguild.h" or an 'extern' before 'IOGuild IOGuild;' ?)
 
@up
if you patched with tortoise this can cause bugs because who that .patch file is for avesta and cause conflit with tfs, try patch manually open the .patch file with text editor and patch manually.
 
I maked two .patch files with the high cpu usage fix for trunk and tag 0.2 the download is above for use unzip right-click->Aplly/Merge Patch with Tortoise SVN
 

Attachments

Last edited:
I've patched this to my TFS, and seems it works.
Till now no bugs or lags, but its night here, so we'll see tomorrow when server will handle around 60 players.

Another bug: !createguild crashes the server (missing #include "ioguild.h" or an 'extern' before 'IOGuild IOGuild;' ?)

IOGuild is no longer using 'extern' method, it's using singleton function (instance), so declaring IOGuild is not necessary, and unless compiler complains #include "ioguild.h" is not necessary either.
 
Well, but that doesn't explain why server gets crashed each time sometimes write !createguild :p

And yes, I still got the issue. ioguild.cpp/h is original, and !createguild command is trunk-like:

Code:
bool Commands::createGuild(Creature* creature, const std::string& cmd, const std::string& param)
{
	Player* player = creature->getPlayer();
	if(player)
	{
		if(player->guildId == 0)
		{
			trimString((std::string&)param);
			uint32_t minLength = g_config.getNumber(ConfigManager::MIN_GUILDNAME);
			uint32_t maxLength = g_config.getNumber(ConfigManager::MAX_GUILDNAME);
			if(param.length() >= minLength)
			{
				if(param.length() <= maxLength)
				{
					uint32_t guildId;
					if(!IOGuild::getInstance()->getGuildIdByName(guildId, param))
					{
						uint32_t reqLevel = g_config.getNumber(ConfigManager::LEVEL_TO_FORM_GUILD);
						if(player->level >= reqLevel)
						{
							if(player->isPremium())
							{
								char buffer[40 + maxLength];
								sprintf(buffer, "You have formed the guild: %s!", param.c_str());
								player->sendTextMessage(MSG_INFO_DESCR, buffer);
								player->setGuildName(param);

								IOGuild::getInstance()->createGuild(player);
								return true;
							}
							else
								player->sendCancelMessage(RET_YOUNEEDPREMIUMACCOUNT);
						}
						else
						{
							char buffer[75];
							sprintf(buffer, "You have to be at least Level %i to form a guild.", reqLevel);
							player->sendCancel(buffer);
						}
					}
					else
						player->sendCancel("There is already a guild with that name.");
				}
				else
					player->sendCancel("That guild name is too long, please select a shorter name.");
			}
			else
				player->sendCancel("That guild name is too short, please select a longer name.");
		}
		else
			player->sendCancel("You are already in a guild.");
	}
	return false;
}

I got the MIN_GUILDNAME and MAX_GUILDNAME in configmanager.



EDIT: And about the first bug (two charges removed from a weapon) - there's a transformItem in weapons.cpp (onUsedAmmo) and in combat.cpp (getMinMaxValues). And imho, its better to remove from weapons o_O
 
Last edited:
!createguild crashed for me when there wasnt triggers in db. Becouse i was making backups without it.
 
But you didnt say it, and i'm not a clairvoyant :)

Btw. łodpisz na priv jak już tu siedzisz ;>
 
Last edited:
Unfortunately the patch posted by lithium and done by remeres not fixed the problem of the high use of the cpu, improved but not made more big difference after 2 hours, was to 100% of the cpu = /, although it will not be official pro forgotten server let's see if the talaturen can apply it to the forgotten properly correcting the bug.
 
Status
Not open for further replies.
Back
Top