From ad0c9c710f738b7271e7201bd134df8ee7c6bd89 Mon Sep 17 00:00:00 2001 From: propstg Date: Sat, 7 Dec 2024 01:54:47 -0500 Subject: [PATCH] Add error message when trying to buy max when inventory full, instead of sending usage message --- modules/games/dopewar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/games/dopewar.py b/modules/games/dopewar.py index a05044a..eb578ce 100644 --- a/modules/games/dopewar.py +++ b/modules/games/dopewar.py @@ -241,6 +241,8 @@ def buy_func(nodeID, price_list, choice=0, value='0'): buy_amount = cash // price_list[drug_choice] if buy_amount > 100 - inventory: buy_amount = 100 - inventory + if buy_amount == 0: + return "You don\'t have any empty inventory slots.🎒" # set the buy amount to the max if the user enters m buy_amount = int(buy_amount)