[BUG] Loading Mobs at LOTF

07/24/2009 18:10 ~Yuki~#1
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:
PHP Code:
short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6])); 
Full Class:

PHP Code:
        public static void SpawnAllMobs()
        {
            try
            {
                
int MobsSpawned 0;
                
int MobSpawnsToSpawn DataBase.MobSpawns.Length;

                for (
int j 0MobSpawnsToSpawnj++)
                {
                    
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 0Convert.ToInt32(ThisSpawn[2]); n++)
                    {
                        
uint UID = (uint)General.Rand.Next(400000500000);
                        
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(400000500000);
                        }
                        
SingleMob Mob = new SingleMob((short)spawn_x, (short)spawn_yConvert.ToInt16(ThisSpawn[7]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[6]), uint.Parse(ThisMob[7]), (uint)UIDThisMob[2], int.Parse(ThisMob[1]), short.Parse(ThisMob[4]), (byte)General.Rand.Next(8), byte.Parse(ThisMob[5]), 0true);


                        
AllMobs.Add(UIDMob);

                        
MobsSpawned++; ;
                    }
                }
                
DataBase.Mobs null;
                
DataBase.MobSpawns null;
                
General.WriteLine("Spawned " MobsSpawned " mobs.");
            }
            catch (
Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        } 
Hope someone can help :)
07/24/2009 18:13 Kiyono#2
I had that problem once, I fixed it by changing some mob spawn coords.
07/24/2009 18:19 Arcotemple:)#3
yeah im pretty sure its mob spawn coords as well
07/24/2009 18:31 ~Yuki~#4
weird i thought about IDīs so i used 3 different backups O.O all bugged??

Could someone upload a working one?

U will get some thanks :)


I feel atm like [Only registered and activated users can see links. Click Here To Register...]
07/24/2009 19:37 Pete1990#5
other backups might not work delete all ur mobs and redo them
07/24/2009 19:49 Arcotemple:)#6
yeah go with what pete said cuz you need a certain backup that goes with your server
07/24/2009 20:02 ~Yuki~#7
i know i used 3 different ones ( mob and spawns table only btw acrotemple u dont have to agree on every post if there is nothing usefull in it)
07/24/2009 20:05 Arcotemple:)#8
i only agreed with like 3 posts
so screw you too
i guess #request infraction on me for insulting other members:/
07/24/2009 20:25 ~Yuki~#9
Quote:
Originally Posted by Arcotemple:) View Post
i only agreed with like 3 posts
so screw you too
i guess #request infraction on me for insulting other members:/
I dont think someone needs a guy who just arees to all instead of helping/ or contributing own ideas/solutions

I could report u for the same reason (i have a reason u dont)

Read our Forum Rules carefully again,

Have a nice day.
07/24/2009 20:38 iEagle#10
Its the spawns with the guard1 in tc and other places, and for the meteor doves in mobspawn, delete the record cuz i find them pointless or change the spawn number to 70 or below, it stopped happening to me after that
07/24/2009 20:50 WTFoRK#11
Code:
                    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((ushort)Math.Min(ThisSpawn[3], ThisSpawn[5]), (ushort)Math.Max(ThisSpawn[3], ThisSpawn[5]));
                        short spawn_y = (short)General.Rand.Next((ushort)Math.Min(ThisSpawn[4], ThisSpawn[6]), (ushort)Math.Max(ThisSpawn[4], ThisSpawn[6]));
                        while (AllMobs.Contains(UID))
                        {
                            UID = (uint)General.Rand.Next(400000, 500000);
                        }
that should do.
you're getting wrong values error for sure.
07/24/2009 20:59 ~Yuki~#12
Yep thanks ill try and edit my post


Edit: Working :D

i <3 u :cool:
07/24/2009 22:14 _tao4229_#13
Quote:
Originally Posted by ~Yuki~ View Post
Yep thanks ill try and edit my post


Edit: Working :D

i <3 u :cool:
are you retarded?
the error tells you everything you need to know.
you messed up the minimum x or y coordinate in your database so it was higher than the maximum.


you people amaze me with your lack of common-fucking-sense.
07/24/2009 22:18 _Emme_#14
#closed