Request Server crashing

Join Discord

Mollieshane

Banned
Banned
Nov 6, 2018
82
0
18
Hello, i'm having an issue with a crash right now, i'm pretty sure the cause is portal @Far any ideas? Any help is appreciated

Error:
Code:
Server.MirEnvir.Cell GetCell(System.Drawing.Point) - System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Server.MirEnvir.Map.GetCell(Point location) in C:\Users\CrazyAlien\Desktop\Server1\mir2-master\Server\MirEnvir\Map.cs:line 602
   at Server.MirObjects.PlayerObject.Run(MirDirection dir) in C:\Users\CrazyAlien\Desktop\Server1\mir2-master\Server\MirObjects\PlayerObject.cs:line 5688
   at Server.MirNetwork.MirConnection.Run(Run p) in C:\Users\CrazyAlien\Desktop\Server1\mir2-master\Server\MirNetwork\MirConnection.cs:line 877
   at Server.MirNetwork.MirConnection.ProcessPacket(Packet p) in C:\Users\CrazyAlien\Desktop\Server1\mir2-master\Server\MirNetwork\MirConnection.cs:line 250
   at Server.MirNetwork.MirConnection.Process() in C:\Users\CrazyAlien\Desktop\Server1\mir2-master\Server\MirNetwork\MirConnection.cs:line 184
   at Server.MirEnvir.Envir.WorkLoop() in C:\Users\CrazyAlien\Desktop\Server1\mir2-master\Server\MirEnvir\Envir.cs:line 573

The line causing the error is:

public Cell GetCell(Point location)
{
return Cells[location.X, location.Y];
}

Specifcally the "return Cells"
 
Last edited:

Pete107

🐑[E]dens-[E]lite🐑
Developer
Dec 10, 2003
2,905
393
375
Todmorden, West Yorkshire
I don't have your code and you haven't shown anything other than the error log, can't help any further, one would assume it'd be before line 5688 in PlayerObject.cs (server) but that's just going of what information is provided.


Looks as if there's been a change in your Run code.
 
Upvote 0

Mollieshane

Banned
Banned
Nov 6, 2018
82
0
18
well, here is line 5688 in the playerobject for me.
Code:
            for (int j = 1; j <= steps; j++)
            {
                location = Functions.PointMove(OldLocation, dir, j);
                Cell cell = CurrentMap.GetCell(location); //Line 5688
                if (cell.Objects == null) continue;
                for (int i = 0; i < cell.Objects.Count; i++)
                {
                    if (cell.Objects[i].Race != ObjectType.Spell) continue;
                    SpellObject ob = (SpellObject)cell.Objects[i];

                    ob.ProcessSpell(this);
                    //break;
                }
            }
 
Upvote 0

Pete107

🐑[E]dens-[E]lite🐑
Developer
Dec 10, 2003
2,905
393
375
Todmorden, West Yorkshire
well, here is line 5688 in the playerobject for me.
Code:
            for (int j = 1; j <= steps; j++)
            {
                location = Functions.PointMove(OldLocation, dir, j);
if (!CurrentMap.ValidPoint(location)) continue;
                Cell cell = CurrentMap.GetCell(location); //Line 5688
                if (cell.Objects == null) continue;
                for (int i = 0; i < cell.Objects.Count; i++)
                {
                    if (cell.Objects[i].Race != ObjectType.Spell) continue;
                    SpellObject ob = (SpellObject)cell.Objects[i];

                    ob.ProcessSpell(this);
                    //break;
                }
            }
 
Upvote 0