HellRazor
Knight
I am having this exact same error. I also am running on a linux box. Is there a solution? Thanks!
http://www.runuo.com/community/thre...ives-townhouses-2-0.77850/page-13#post-654807
I am having this exact same error. I also am running on a linux box. Is there a solution? Thanks!
GREAT SYSTEM!!!!
I am having one small issue though.
I read through all 12 pages and only saw this mentioned once but I didn't see a fix. When my players try purchase a house it says "You can not purchase this house". The only way I have been able to get around this is to make the char staff for a moment, let them claim the house and then demote them back to a player. Is there a code fix for this to allow the players more than one house I already have it set for multiple houses per account for regualr houses.
public static bool HasHouse( Mobile m )
{
if ( m == null )
return false;
List<BaseHouse> list = null;
m_Table.TryGetValue( m, out list );
if ( list == null )
return false;
for ( int i = 0; i < list.Count; ++i )
{
BaseHouse h = list[i];
if ( !h.Deleted )
return true;
}
return false;
}
From the looking at the script and BaseHouse.cs I'm betting that you only have this issue when another player already has at least one house. Seems that it calls the HasAccountHouse before allowing them to purchase a town house. And HasAccountHouse will always return true in it's current form, if the player has one house. Even if they can in fact own more houses than that. Seems like an easy way to fix this would be to edit this method, or the original method in the actual town house sign script (could make it use your own method to see if they are at their max houses, instead of using the basehouse methods) or just simply edit the basehouse method, or even add a new method such as...CanBuyAnotherHouse() since changing the original method might make some other things mess up.
for ( int i = 0; i < list.Count; ++i )
to
for ( int i = 3; i < list.Count; ++i )
That won't help, as it will still return true within the loop if the player has just one house.
int m_HouseCount = 0;
for ( int i = 0; i < list.Count; ++i )
{
BaseHouse h = list[i];
if ( !h.Deleted )
m_HouseCount += 1;
if( m_HouseCount > 4 ) //Should be 1 less than your house cap.
return true;
}
Errors:
+ Custom/Town Houses v2.01/Misc/GumpResponse.cs:
CS0266: Line 28: Cannot implicitly convert type 'System.Collections.Generic.
IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps
.Gump>'. An explicit conversion exists (are you missing a cast?)
+ Custom/Ultima Paintball 1.2.0/PBGameItem.cs:
CS0117: Line 552: 'System.Collections.Generic.List<Server.SkillName>' does n
ot contain a definition for 'Length'
+ Custom/Ultima Paintball 1.2.0/PBPlayerStorage.cs:
CS0117: Line 72: 'System.Collections.Generic.List<Server.SkillName>' does no
t contain a definition for 'Length'
Ah, I've seen this error before. Try changing Length to Count
Errors:
+ Custom/Town Houses v2.01/Misc/GumpResponse.cs:
CS0266: Line 28: Cannot implicitly convert type 'System.Collections.Generic.
IEnumerable<Server.Gumps.Gump>' to 'System.Collections.Generic.List<Server.Gumps
.Gump>'. An explicit conversion exists (are you missing a cast?)
Ok, I seem to have fixed that error. However I now have an error with deleting the townhouses. Everything freezes up and then the server crashes.