Vorspire;800523 said:Do you think that generated maps should be anything above 0x7F (Internal) ?
Kamron;801268 said:Anyone interested?
if( <MobileReference>.Map.ID == <MapID> )
{ }
if( <MobileReference>.Map.Name == <MapName> )
{ }
Errors:
+ New Folder/Raid Dungeon/Group Dungeons 1.7 Final/GroupDungeonRegion.cs:
CS0508: Line 348: 'Server.Regions.GroupDungeonRegion.OnDeath(Server.Mobile)'
: return type must be 'void' to match overridden member 'Server.Region.OnDeath(Server.Mobile)'
Errors:
+ New Folder/Raid Dungeon/Group Dungeons 1.7 Final/GroupDungeonRegion.cs:
CS0127: Line 393: Since 'Server.Regions.GroupDungeonRegion.OnDeath(Server.Mo
bile)' returns void, a return keyword must not be followed by an object expressi
on
public override void OnDeath(Mobile m)
{
// Check to see if the dungeon has been cleared, then kick callback.
if (m is BaseCreature)
{
int count = 0;
foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
{
if (m2 is BaseCreature && m2 != m) // count living creatures
count++;
}
if (count <= 0) // All dead
{
// find all players and invoke kick.
foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
{
if (m2.Player) // call dungeon finish
Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(DungeonCleared), new object[] { m2, m_Stone });
}
}
}
// Check to see if the party has been cleared, then kick callback.
else if (m is PlayerMobile)
{
int count = 0;
foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
{
if (m2 is PlayerMobile && m2.Alive && m2 != m && (m2.AccessLevel == AccessLevel.Player)) // count living non-staff players
count++;
}
// find all players and invoke kick.
if (count <= 0)
{
foreach (Mobile m2 in m_Stone.GetMobilesInRange(m_Stone.Size))
{
if (m2 is PlayerMobile && m2.AccessLevel == AccessLevel.Player)
Timer.DelayCall(TimeSpan.FromSeconds(5), new TimerStateCallback(GroupWipe), new object[] { m2, m_Stone });
}
}
}
[COLOR="Red"]return base.OnDeath(m);[/COLOR]
}
iamjedi;693582 said:You should be fine bu just removing the return line at the end: return this.OnDeath(m);
Hope that handles it!
iamjedi;693582 said:You should be fine bu just removing the return line at the end: return this.OnDeath(m);
Hope that handles it!
public override void OnDeath( Container c )
{
base.OnDeath( c );
if( c == null || c.Deleted )
[COLOR="Red"]return;[/COLOR]
c.AddItem( new Longsword( ) );
}
Vorspire;808600 said:That won't work either.
The OnDeath method needs a return type of VOID, but VOID is simply a keyword and not a type at all.
There are no object references associated with the VOID keyword, therefore you must return nothing, period.
The VOID keyword is unique in comparison with all other return type keywords.
A method requiring the VOID return type does not actually need a return statement at all, unless other specified arguments have been met and there is no use in executing further code in the method scope.
Code:public override void OnDeath( Container c ) { base.OnDeath( c ); if( c == null || c.Deleted ) [COLOR="Red"]return;[/COLOR] c.AddItem( new Longsword( ) ); }