Hello guys!
Well my problem is If i try to startup my LOTF Source
I get an error:
minValue cant be higher than MaxValue
Line:
Full Class:
Hope someone can help :)
Well my problem is If i try to startup my LOTF Source
I get an error:
minValue cant be higher than MaxValue
Line:
PHP Code:
short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6]));
PHP Code:
public static void SpawnAllMobs()
{
try
{
int MobsSpawned = 0;
int MobSpawnsToSpawn = DataBase.MobSpawns.Length;
for (int j = 0; j < MobSpawnsToSpawn; j++)
{
uint[] ThisSpawn = DataBase.MobSpawns[j];
string[] ThisMob = null;
foreach (string[] FindId in DataBase.Mobs)
{
if (FindId[0] == Convert.ToString(ThisSpawn[1]))
{
ThisMob = FindId;
}
}
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((short)spawn_x, (short)spawn_y, Convert.ToInt16(ThisSpawn[7]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[6]), uint.Parse(ThisMob[7]), (uint)UID, ThisMob[2], int.Parse(ThisMob[1]), short.Parse(ThisMob[4]), (byte)General.Rand.Next(8), byte.Parse(ThisMob[5]), 0, true);
AllMobs.Add(UID, Mob);
MobsSpawned++; ;
}
}
DataBase.Mobs = null;
DataBase.MobSpawns = null;
General.WriteLine("Spawned " + MobsSpawned + " mobs.");
}
catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
}