Couldn't run it

So when i run it and click on a tile, I get the following error:

NotImplementedException: The method or operation is not implemented.
System.Collections.Generic.GenericEqualityComparer1[T].IndexOf (T[] array, T value, System.Int32 startIndex, System.Int32 count) (at <3dd5df5ef4974f29afeb2d3ba227c5da>:0) System.Array.IndexOfImpl[T] (T[] array, T value, System.Int32 startIndex, System.Int32 count) (at <3dd5df5ef4974f29afeb2d3ba227c5da>:0) System.Array.IndexOf[T] (T[] array, T value, System.Int32 startIndex, System.Int32 count) (at <3dd5df5ef4974f29afeb2d3ba227c5da>:0) System.Collections.Generic.List1[T].IndexOf (T item) (at <3dd5df5ef4974f29afeb2d3ba227c5da>:0)
System.Collections.Generic.List`1[T].Contains (T item) (at <3dd5df5ef4974f29afeb2d3ba227c5da>:0)
MoveAction.IsValidActionGridPosition (GridPosition gridPosition) (at Assets/Scripts/MoveAction.cs:58)
UnitActionSystem.Update () (at Assets/Scripts/UnitActionSystem.cs:39)

Can anyone help?

This is the function it is complaining about:

public bool IsValidActionGridPosition(GridPosition gridPosition)
{
    List<GridPosition> validGridPositionList = GetValidActionGridPositionList();
    return validGridPositionList.Contains(gridPosition);
}

You have to complete implementing the IEquatable<GridPosition> in GridPosition. If you check the code, you may find that you did not implement one of the methods and it is still on the generated

public bool Equals(GridPosition other)
{
    throw new NotImplementedException();
}
2 Likes

Thanks so much for the help :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms