Amadora

Member
Hello, everyone, I added the Knives Town Houses to my shard and I get this error
Errors:
+ custom/Test/Town Houses v2.01/Items/TownHouseSign.cs:
CS0117: Line 1084: 'BaseHouse' does not contain a definition for 'HasAccountHouse'
Scripts: One or more scripts failed to compile or no script files were found.
any ideas on how to fix it the version of Knives I am using is attached to this post thank you in advance
 

Attachments

  • [ServUO.com]-KnivesTownHouses.zip
    51.1 KB · Views: 6
Your BaseHouse.cs doesn't contain a code for HasAccountHouse, maybe try changing that line to AccountHouseLimit. I would guess the knives town house scripts were meant for older servers and hasn't been updated for the newer ones.
 
TL;DR: The town houses script needs to be rewritten for how ServUO handles player housing.

Full: After looking at Knives' TownHouseSign.cs and the core BaseHouse.cs it appears that the problem is caused by a change in how housing is accounted for between RunUO for which the script was written and ServUO. It looks like RunUO allowed for a hard coded maximum of one house per account, whereas ServUO has flexibility to support more than one house per account. So, when Knives' script checks to see if the player already has an account house:
C#:
!BaseHouse.HasAccountHouse( m )
the script is using a member that no longer exists in the BaseHouse object.

Even if you were able to find away around this check, I suspect you'd run into other problems, as the new ServUO housing management is achieved by maintaining a
C#:
List<BaseHouse> list
of the houses owned by the player. So, without the script appropriately adding the new housing to the List and removing it from the List, when applicable, there could be unintended consequences.
 
The first check is a quick fix, as seen in the house placement tool:

Code:
BaseHouse.CheckAccountHouseLimit(from)

I'm not sure yet if I want to deal with TownHouses on the shard I'm tinkering with. I will say that I've had no issues at all in 4-5 years with them on a live older RunUO shard.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back