// Check if the new position is on an arrow
foreach (Item Item in GetFloorItems())
{
if (Item.Definition.SpriteId == 5000)
{
if (Actor.PositionToSet.X == Item.RoomPosition.X && Actor.PositionToSet.Y == Item.RoomPosition.Y)
{
Session Session = SessionManager.GetSessionByCharacterId(Actor.ReferenceId);
ItemEventDispatcher.InvokeItemEventHandler(Session, Item, this, ItemEventType.Interact, Actor.MoveToAndInteractData);
}
}
}
the error line : if (Actor.PositionToSet.X == Item.RoomPosition.X && Actor.PositionToSet.Y == Item.RoomPosition.Y)
Sorry, I'm new to C#. Had this problem before, I just can't seem to see what's wrong, Although it was on a different line, all I had to do was check if it was null, but don't see much of the same here?