House Cellar AddOn Error

john burns

Well-Known Member
Mar 12, 2014
729
23
48
Michigan, USA
vachiadroylia.dynu.net
Shard Name
Vachia Droylia
Getting this error:

+ _custom/Cellar.cs:
CS1929: Line 1067: Type `System.Collections.Generic.Dictionary<Server.Item,Server.Mobile>' does not contain a member `Contains' and the best extension method overload `Server.Rectangle3DExtUtility.Contains(this Server.RegionRect[], Server.IPoint3D)' requires an instance of type `Server.RegionRect[]'
CS1501: Line 1069: No overload for method `Add' takes `1' arguments
 

PyrO

Well-Known Member
Jan 27, 2015
1,152
92
Looks to me that you changed a List to a Dictionary? Or maybe its looking at something from the repo that was changed that way.

It would be best to show the offending lines.

Normally you would go with something like
C#:
Mobile mobilefromdict;

if(yourdictionary.TryGetValue(itemyoulookfor, out mobilefromdict))
{
    // Value exists in the dictionary
}
you can also look at things with ContainsKey or ContainsValue


to add to a dictionary you need 2 parameters, one for the key and the other for the item you want to store

C#:
yourdictionary.Add(keyitem, mobileyouwanttostore);