|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) | |
|
Forum Novice
Join Date: Mar 2004
Location: Wisconsin
Age: 45
Posts: 789
|
Code:
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.CurrentSystemTimeZone.GetDaylightChanges(Int32 year) at System.CurrentSystemTimeZone.GetUtcOffsetFromUniversalTime(DateTime time, Boolean& isAmbiguousLocalDst) at System.CurrentSystemTimeZone.ToLocalTime(DateTime time) at System.DateTime.ToLocalTime() at System.DateTime.get_Now() Thanks....
__________________
Quote:
|
|
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
you need more memory..
__________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." |
|
|
|
|
|
#3 (permalink) |
|
Forum Novice
Join Date: Jul 2004
Location: Switzerland
Age: 25
Posts: 234
|
Hi
Looks like your server was running out of memory. There are lots of reasons why this can happen. Most commonly, because there are too much objects in your world like items or mobiles. Or because you have some really memory consuming array data. Do a search for OutOfMemoryException to get further information ![]() |
|
|
|
|
|
#4 (permalink) | |
|
Forum Novice
Join Date: Mar 2004
Location: Wisconsin
Age: 45
Posts: 789
|
World Loading...330760 items, 50524 mobiles
The day before I switched to the custom ore elementals which use : EX: Code:
public override void OnActionCombat()
{
if ( DateTime.Now > m_Delay )
{
foreach ( Mobile m in Map.GetMobilesInRange( Location, 3 ) )
{
if ( m != null )
{
if ( !m.Alive || m.AccessLevel > AccessLevel.Player || (m is BaseCreature && ( !((BaseCreature)m).Controlled || ((BaseCreature)m).IsDeadPet )) )
continue;
if ( m is PlayerMobile )
{
m.PlaySound( 0x231 );
m.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
m.ApplyPoison( m, Poison.Greater );
m.SendMessage( "It exhails a cloud of noxious vapors" );
}
else
{
m.PlaySound( 0x231 );
m.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
m.ApplyPoison( m, Poison.Greater );
}
m.RevealingAction();
}
}
int sec = Utility.RandomMinMax( 5, 10 );
m_Delay = DateTime.Now + TimeSpan.FromSeconds( sec );
}
}
From Peoharen for the Mobile Abilities Package. Code:
//Created by Peoharen for the Mobile Abilities Package.
using System;
using System.Collections;
using Server.Items;
using Server.Mobiles;
namespace Server
{
public class Ability
{
//<*************Aura Start
public static void Aura( Mobile from, int min, int max, int type, int range, int poisons, string text )
{
ArrayList targets = new ArrayList();
foreach ( Mobile m in from.GetMobilesInRange( range ) )
{
if ( m == from || m == null )
continue;
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned ) )
targets.Add( m );
else if ( m.Player && m.AccessLevel == AccessLevel.Player && m.Alive )
targets.Add( m );
}
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
m.RevealingAction();
m.SendMessage( text );
int auradamage = Utility.RandomMinMax( min, max );
//TODO: Finsh Animations.
if ( type == 1 )
{
AOS.Damage( m, from, auradamage, 0, 100, 0, 0, 0 );
}
else if ( type == 2 )
{
AOS.Damage( m, from, auradamage, 0, 0, 100, 0, 0 );
}
else if ( type == 3 )
{
AOS.Damage( m, from, auradamage, 0, 0, 0, 100, 0 );
m.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
}
else if ( type == 4 )
{
AOS.Damage( m, from, auradamage, 0, 0, 0, 0, 100 );
}
else
{
AOS.Damage( m, from, auradamage, 100, 0, 0, 0, 0 );
}
if ( poisons == 1 )
m.ApplyPoison( from, Poison.Lesser );
else if ( poisons == 2 )
m.ApplyPoison( from, Poison.Regular );
else if ( poisons == 3 )
m.ApplyPoison( from, Poison.Greater );
else if ( poisons == 4 )
m.ApplyPoison( from, Poison.Deadly );
else if ( poisons == 5 )
m.ApplyPoison( from, Poison.Lethal );
else
{};
//TODO Make this varable: m.FixedParticles( 0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255 );
}
}
//<*************Aura End
//<*************Stat Reduction Start
public static void LowerStat( Mobile target, int minloss, int maxloss, int mintime, int maxtime, int type )
{
StatType stattype;
if ( target.GetStatMod("LowerStats") != null)
return;
int offset = Utility.Random( minloss, maxloss );
int duration = Utility.Random( mintime, maxtime );
string name = "LowerStats";
if ( type == 1 )
stattype = StatType.Str;
else if ( type == 2 )
stattype = StatType.Dex;
else if ( type == 3 )
stattype = StatType.Int;
else
{
switch( Utility.Random( 3 ) )
{
default:
case 0: stattype = StatType.Str; break;
case 1: stattype = StatType.Dex; break;
case 2: stattype = StatType.Int; break;
}
};
target.AddStatMod( new StatMod( stattype, name, -offset, TimeSpan.FromSeconds( duration) ) );
}
//<*************Stat Reduction End
//<*************Damage Armor Start
public static void DamageArmor( Mobile to )
{
double positionChance = Utility.RandomDouble();
BaseArmor armor;
if ( positionChance < 0.07 )
armor = to.NeckArmor as BaseArmor;
else if ( positionChance < 0.14 )
armor = to.HandArmor as BaseArmor;
else if ( positionChance < 0.28 )
armor = to.ArmsArmor as BaseArmor;
else if ( positionChance < 0.43 )
armor = to.HeadArmor as BaseArmor;
else if ( positionChance < 0.65 )
armor = to.LegsArmor as BaseArmor;
else
armor = to.ChestArmor as BaseArmor;
if ( armor != null )
{
int ruin = Utility.RandomMinMax( 1, 4 );
armor.HitPoints -= ruin;
}
}
//<*************Damage Armor End
//<*************Misc Abilites Start
public static void TurnPet( Mobile target )
{
if ( target is BaseCreature )
{
BaseCreature c = (BaseCreature) target;
if ( c.Controlled && c.ControlMaster != null )
{
c.ControlTarget = c.ControlMaster;
c.ControlOrder = OrderType.Attack;
c.Combatant = c.ControlMaster;
}
}
}
//<*************Misc Abilites End
}
}
/*
+ Abilities.cs:
CS1026: Line 22: ) expected
*/
We have 2 gigs ram, computer was totally formatted and windows, .Net 1.1 and 2.0 installed and updated, cleaned(literally) new CPU fan( AMDs can run hot) so on and so forth.... Server ran without issue all week, then saturday added the ore ellys with ability, andthis morning at 12:30am the server crashed. Did a search on that error and this is over my head, but others on the web have posted same error on other games, applications and mentioned a possible issue with .NET - does anyone have an true/false regarding this? We have removed the ore ellys with abilities and gone back to distro ones for now. Thanks
__________________
Quote:
|
|
|
|
|
|
|
#5 (permalink) |
|
Forum Master
|
i did not noticed a repeating loop at all in there, but they are easy to miss
but i did notice you are using oncombat -- that means when in combat, each loop through it it is going to check - that is a lot of checking to to see if the delay has expired or not - so that is many many times per second also - they poison themselves in that routine - just an fyi, and any other eles in the area - but not sumjmoned or controled critters - they should be effected also (dead pets - can't poison the dead, but their dragon should be lol) and actualy - it should only be when they do a hit or something (their punch causes the spores to be released, etc ) so i would try on gavemeleeattack (or something like that) - so it only checks once per attack max (only if they land a blow) - this may fix your problem here - removing how many times it is being called
__________________
http://www.AoAUO.com
:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :) |
|
|
|
|
|
#6 (permalink) | |
|
Forum Novice
Join Date: Mar 2004
Location: Wisconsin
Age: 45
Posts: 789
|
Looking at the Succubus script as an example - rather then using a seperate abilities call, use how that is written to do a similar action - is my thinking.
I had asked on another post about this ability because there were 2 discussions over the 'better' way to put this effect in - the OnThink was actually in question between the 2 opposing opinions on this subject. For something as non important as these to our server, I will rewrite them along the succubus guidline - they are not hunted( just a few in Shame) or dug up with a garg pick all that much.( lots of better stuff out there to hunt down :] ) Thanks for the input! I'll see what I can come up with!
__________________
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|