Amalek

Member
sorry. I would have a problem with the script of the mercenary, give me a poroblema to line 1282-- from me below reported .
Errors:
+ CUSTOM/Merc/EvoMerc.CS:
CS0266: Line 1282: Cannot implicitly convert type 'Server.IDamageable' to 'S
erver.Mobile'. An explicit conversion exists (are you missing a cast?)
Scripts: One or more scripts failed to compile or no script files were found.

I also attach the lines of the script:

public override void OnActionCombat()
{
Mobile combatant = Combatant;

if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 12 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
return;

if ( DateTime.Now >= m_NextBreathe )
{
Breathe( combatant );

m_NextBreathe = DateTime.Now + TimeSpan.FromSeconds( 12.0 + (3.0 * Utility.RandomDouble()) ); // 12-15 seconds
}
}


who can help me
 
I would think that may still cause errors.

I would do this
Mobile combatant = Combatant as Mobile;
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back