Is there a fix for it or no?It is a null error, looks like something is being called in SpawnEel(Mobile m) where mobile m is null
I asked and everyone was afks at that time not doing anything. I was not at home when this happened. Crash report only had 4 ppl logged in at that time.What are you or your players doing when this happens, can you repeat it? What map is this happening on?
That's what came with the server. I didn't mod any of it.Its that a stock system script or custom script?
public override void OnDamagedBySpell(Mobile from)
{
base.OnDamagedBySpell(from);
if (from != null)
{
if (m_NextSpawn < DateTime.UtcNow && m_Eels.Count < SpawnMax && 0.25 > Utility.RandomDouble())
SpawnEel(from);
}
}
public override void OnGotMeleeAttack(Mobile attacker)
{
base.OnGotMeleeAttack(attacker);
if (attacker != null)
{
if (attacker.Weapon is BaseRanged && m_NextSpawn < DateTime.UtcNow && m_Eels.Count < SpawnMax && 0.25 > Utility.RandomDouble())
SpawnEel(attacker);
}
}
Replace two methods with the ones I provide here in that script, I suspect a player left when calling for the eel spawn and that resulted in a null exception
Code:public override void OnDamagedBySpell(Mobile from) { base.OnDamagedBySpell(from); if (from != null) { if (m_NextSpawn < DateTime.UtcNow && m_Eels.Count < SpawnMax && 0.25 > Utility.RandomDouble()) SpawnEel(from); } } public override void OnGotMeleeAttack(Mobile attacker) { base.OnGotMeleeAttack(attacker); if (attacker != null) { if (attacker.Weapon is BaseRanged && m_NextSpawn < DateTime.UtcNow && m_Eels.Count < SpawnMax && 0.25 > Utility.RandomDouble()) SpawnEel(attacker); } }
Ok Replaced that and it compiledReplace two methods with the ones I provide here in that script, I suspect a player left when calling for the eel spawn and that resulted in a null exception
Code:public override void OnDamagedBySpell(Mobile from) { base.OnDamagedBySpell(from); if (from != null) { if (m_NextSpawn < DateTime.UtcNow && m_Eels.Count < SpawnMax && 0.25 > Utility.RandomDouble()) SpawnEel(from); } } public override void OnGotMeleeAttack(Mobile attacker) { base.OnGotMeleeAttack(attacker); if (attacker != null) { if (attacker.Weapon is BaseRanged && m_NextSpawn < DateTime.UtcNow && m_Eels.Count < SpawnMax && 0.25 > Utility.RandomDouble()) SpawnEel(attacker); } }
We use essential cookies to make this site work, and optional cookies to enhance your experience.