Skip to content

Commit 63e4af7

Browse files
committed
can no longer /pay users a negative value
1 parent c63d602 commit 63e4af7

7 files changed

Lines changed: 7 additions & 2 deletions

File tree

474 Bytes
Binary file not shown.
84.5 KB
Binary file not shown.
1 Byte
Binary file not shown.
Binary file not shown.
Binary file not shown.

.vs/SimpleEcon/v17/.futdcache.v2

0 Bytes
Binary file not shown.

SimpleEcon/SimpleEcon.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,13 @@ private void PayUser(CommandArgs args)
275275
return;
276276
}
277277
float amount = float.Parse(args.Parameters[1]);
278-
279-
if(amount <= PlayerManager.GetPlayer(args.Player.Name).balance)
278+
if(amount < 1)
279+
{
280+
args.Player.SendErrorMessage("Please send a valid amount!");
281+
return;
282+
}
283+
284+
if (amount <= PlayerManager.GetPlayer(args.Player.Name).balance)
280285
{
281286
PlayerManager.GetPlayer(args.Player.Name).balance -= amount;
282287
PlayerManager.GetPlayer(player.Name).balance += amount;

0 commit comments

Comments
 (0)