Ok the monsters i added Work but one problem

08/08/2009 06:19 hunterman01#1
Alright they were working then all of a sudden i got this error so 0.0 any help


Code:
System.ArgumentOutOfRangeException:'minValue' cannot be greater then maxValue
Parameter name:minValue
  at System.Random.Next(Int32 min Value,Int32 maxValue)
  at CoServer_Project.Mobs.SpawnAllMobs() 

Etities.cs:line 205
Obviously there is a problem with the values i just cant figure it out Any help is appreciated
08/08/2009 06:22 raidenx123#2
lol it looks like u have like min attk and max attk like lets say 5000min attk and 4500max attk or something like that...check 4 that :D
08/08/2009 06:26 CoAttack#3
Okay most likely your HP cant be bigger than a uint.MaxValue unless you changed it

your min attack can not be greater than max attack also they both can not be greater then about a 32.6k [ idk exact number i think its ushort.maxvalue ]

make sure your coordinates also, like start x and y BOTH must be lower then END x and Y

so if your start is

45 , 50 your end MUST be 46,51 IT CAN NOT BE 46,49

hope that helps =]]
08/09/2009 04:42 Jay1029#4
If none of that works try putting your x, y start and x, y end as the same coordinates. Example 80, 80 80, 80
I know it most likely wont be were you wanted it to be but that's the only way I got a few of mine to work. I have no clue why only some of my mobs work that way but meh, they work now so I ain't complaining. I was getting some retarded errors before too lol.
08/09/2009 05:03 andyd123#5
Solution: The provided numerical values for 'minValue' and 'maxValue' in the call to Random.Next are either switched around:
Code:
Random.Next(maxValue, minValue);
or somewhere, you declare minValue to be greater than maxValue.
A very easy fix would be:
Code:
if(minValue < maxValue)
    Random.Next(minValue, maxValue);
else
    Random.Next(maxValue, minValue);
This would likely have adverse effects if you didn't just mis-order the two numbers.