Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Update Khana.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VargaDot committed Mar 1, 2024
1 parent 8c31fc6 commit 12f4ac2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions data_manager/Khana.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,16 @@ public byte[] GetAgentPortfolio(byte AgentID)

private Agent FindAgent(byte AgentID)
{
return Daftar.Find(agent => agent.ID == AgentID);
var x = Daftar.Find(agent => agent.ID == AgentID);
if (x.Equals(default(Agent))) GD.PrintErr($"{x} is an invalid AgentID");
return x;
}

private Property FindProperty(byte AgentID, byte PropertyID)
{
Agent agent = FindAgent(AgentID);
return agent.Portfolio.Find(property => property.ID == PropertyID);
var x = agent.Portfolio.Find(property => property.ID == PropertyID);
if (x.Equals(default(Property))) GD.PrintErr($"{x} is an invalid PropertyID");
return x;
}
}

0 comments on commit 12f4ac2

Please sign in to comment.