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

Linux Crash Server

leonmagmo

New Member
Joined
Mar 17, 2009
Messages
82
Reaction score
3
My server is crashing and always with the same error, sometimes takes a long time to crash (over 24 hours) but sometimes it takes only a few hours

Here are two logs:
http://imageshack.com/a/img834/9250/gtez.png
http://imageshack.com/a/img20/504/okxc.png

SpriteID 9642 = it's a part of big footprint
SpriteID 10734 = it's a part of tibia flag(used in ships)

I'm using these source edits in my server:
http://otland.net/threads/creatureevent-onmove-very-advanced.134016/
http://otland.net/threads/autostacking-stackable-items-in-tfs-0-3-6pl1.162795/

I'm using TFS 0.3.6pl1

Anyone know why that is happening?

Code:
    uint8_t fromIndex = 0;
    if(fromPos.x == 0xFFFF)
    {
        if(fromPos.y & 0x40)
        {
            fromIndex = static_cast<uint8_t>(fromPos.z);
            fromItem = fromCylinder->getItem();       ------------ Line 1256
            if (fromItem)
            {
                fromPlayer = fromItem->getHoldingPlayer();
                Item* parentFromItem = fromItem->getTopParent()->getItem();
                if (fromItem->isDepot() || (parentFromItem && parentFromItem->isDepot()) )
                    fromDepot = true;
            }
        }
        else
        {
            fromIndex = static_cast<uint8_t>(fromPos.y);
            //custom move
            deequip = true;
            //
        }
    }
    else
    {
        fromIndex = fromStackpos;
        const TileItemVector* items = fromCylinder->getTile()->getItemList();
        Thing* thing = internalGetThing(player, fromPos, fromIndex, spriteId, STACKPOS_MOVE);
if(thing && thing->getItem())
        {
            Item* movingItem = thing->getItem();
            fromItem = NULL;
            fromGround = fromCylinder->getTile()->ground;
            for(ItemVector::const_reverse_iterator it = items->rbegin(); it != items->rend(); ++it)
            {
                if((*it) != movingItem)
                    fromItem = (*it);
            }
            if(!fromItem || fromItem == movingItem )
                fromItem = fromGround ;
        }
    }
 
If don't want help dont post unnecessary things in topic.
who said it is unnecessary.? he just made us sure that the error is from that Stacking.the Cylinder sometimes returns null
try
Code:
 uint8_t fromIndex = 0;
  if(fromPos.x == 0xFFFF)
  {
  if(fromPos.y & 0x40)
  {
  fromIndex = static_cast<uint8_t>(fromPos.z);  ------------ Line 1256
  if (fromCylinder->getItem())
  {
       fromItem = fromCylinder->getItem();
  fromPlayer = fromCylinder->getItem()->getHoldingPlayer();
  Item* parentFromItem = fromCylinder->getItem()->getTopParent()->getItem();
  if (fromCylinder->getItem()->isDepot() || (parentFromItem && parentFromItem->isDepot()) )
  fromDepot = true;
  }
  }
  else
  {
  fromIndex = static_cast<uint8_t>(fromPos.y);
  //custom move
  deequip = true;
  //
  }
  }
  else
  {
  fromIndex = fromStackpos;
  const TileItemVector* items = fromCylinder->getTile()->getItemList();
  Thing* thing = internalGetThing(player, fromPos, fromIndex, spriteId, STACKPOS_MOVE);
if(thing && thing->getItem())
  {
  Item* movingItem = thing->getItem();
  fromItem = NULL;
  fromGround = fromCylinder->getTile()->ground;
  for(ItemVector::const_reverse_iterator it = items->rbegin(); it != items->rend(); ++it)
  {
  if((*it) != movingItem)
  fromItem = (*it);
  }
  if(!fromItem || fromItem == movingItem )
  fromItem = fromGround ;
  }
  }
 
who said it is unnecessary.? he just made us sure that the error is from that Stacking.the Cylinder sometimes returns null
try
Code:
uint8_t fromIndex = 0;
  if(fromPos.x == 0xFFFF)
  {
  if(fromPos.y & 0x40)
  {
  fromIndex = static_cast<uint8_t>(fromPos.z);  ------------ Line 1256
  if (fromCylinder->getItem())
  {
       fromItem = fromCylinder->getItem();
  fromPlayer = fromCylinder->getItem()->getHoldingPlayer();
  Item* parentFromItem = fromCylinder->getItem()->getTopParent()->getItem();
  if (fromCylinder->getItem()->isDepot() || (parentFromItem && parentFromItem->isDepot()) )
  fromDepot = true;
  }
  }
  else
  {
  fromIndex = static_cast<uint8_t>(fromPos.y);
  //custom move
  deequip = true;
  //
  }
  }
  else
  {
  fromIndex = fromStackpos;
  const TileItemVector* items = fromCylinder->getTile()->getItemList();
  Thing* thing = internalGetThing(player, fromPos, fromIndex, spriteId, STACKPOS_MOVE);
if(thing && thing->getItem())
  {
  Item* movingItem = thing->getItem();
  fromItem = NULL;
  fromGround = fromCylinder->getTile()->ground;
  for(ItemVector::const_reverse_iterator it = items->rbegin(); it != items->rend(); ++it)
  {
  if((*it) != movingItem)
  fromItem = (*it);
  }
  if(!fromItem || fromItem == movingItem )
  fromItem = fromGround ;
  }
  }

Thanks! I'll try
 
Back
Top