i need help fixing this
Loaded 254 portals.
Loaded 1019 NPCs.
Loaded 40 Mobs.
Loaded 11147 items.
Loaded 172 Mob Spawns.
System.ArgumentOutOfRangeException: 'minValue' cannot be greater than maxValue.
Parameter name: minValue
at System.Random.Next(Int32 minValue, Int32 maxValue)
at COServer_Project.Mobs.SpawnAllMobs() in D:\CONQUER ONLINE SERVER STUFF\COServerProject\COServerProject1\COServerPro ject\Entities.cs:line 207
Loading Plus info done.
all i know is that with that error i cannot spawn more mobs
and on that line 207 it is
short spawn_x = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[3]), Convert.ToInt16(ThisSpawn[5]));
the whole section is
for (int n = 0; n < Convert.ToInt32(ThisSpawn[2]); n++)
{
uint UID = (uint)General.Rand.Next(400000, 500000);
short spawn_x = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[3]), Convert.ToInt16(ThisSpawn[5]));
short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6]));
while (AllMobs.Contains(UID))
{
UID = (uint)General.Rand.Next(400000, 500000);
}
SingleMob Mob = new SingleMob(spawn_x, spawn_y, Convert.ToInt16(ThisSpawn[7]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[3]), short.Parse(ThisMob[6]), short.Parse(ThisMob[7]), UID, ThisMob[2], int.Parse(ThisMob[1]), short.Parse(ThisMob[4]), (byte)General.Rand.Next(8), byte.Parse(ThisMob[5]));
AllMobs.Add(UID, Mob);
MobsSpawned++; ;
}
thats all the info i know about that the problem occurs at
Loaded 254 portals.
Loaded 1019 NPCs.
Loaded 40 Mobs.
Loaded 11147 items.
Loaded 172 Mob Spawns.
System.ArgumentOutOfRangeException: 'minValue' cannot be greater than maxValue.
Parameter name: minValue
at System.Random.Next(Int32 minValue, Int32 maxValue)
at COServer_Project.Mobs.SpawnAllMobs() in D:\CONQUER ONLINE SERVER STUFF\COServerProject\COServerProject1\COServerPro ject\Entities.cs:line 207
Loading Plus info done.
all i know is that with that error i cannot spawn more mobs
and on that line 207 it is
short spawn_x = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[3]), Convert.ToInt16(ThisSpawn[5]));
the whole section is
for (int n = 0; n < Convert.ToInt32(ThisSpawn[2]); n++)
{
uint UID = (uint)General.Rand.Next(400000, 500000);
short spawn_x = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[3]), Convert.ToInt16(ThisSpawn[5]));
short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6]));
while (AllMobs.Contains(UID))
{
UID = (uint)General.Rand.Next(400000, 500000);
}
SingleMob Mob = new SingleMob(spawn_x, spawn_y, Convert.ToInt16(ThisSpawn[7]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[3]), short.Parse(ThisMob[6]), short.Parse(ThisMob[7]), UID, ThisMob[2], int.Parse(ThisMob[1]), short.Parse(ThisMob[4]), (byte)General.Rand.Next(8), byte.Parse(ThisMob[5]));
AllMobs.Add(UID, Mob);
MobsSpawned++; ;
}
thats all the info i know about that the problem occurs at