From 5cd2e5fd1cd07bad76998f23c49aae0a0684f565 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Fri, 29 Mar 2024 11:33:31 -0700 Subject: [PATCH] Add error handling message when missing argument --- python/guilds/guild_entry.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/guilds/guild_entry.py b/python/guilds/guild_entry.py index 9166a8c3f..6a350cd4f 100644 --- a/python/guilds/guild_entry.py +++ b/python/guilds/guild_entry.py @@ -51,8 +51,11 @@ if text: activator.Write('This guild is currently under probation.\nPlease see a DM for more information') elif (CheckClearance(Params,activator)): #check their status - message = 'Entry granted for %s' %activatorname - mymap.TriggerConnected(int(Params[2]),1,activator) + if len(Params) < 3: + message = "I don't know which door I'm supposed to open for you. Contact a DM." + else: + message = 'Entry granted for %s' %activatorname + mymap.TriggerConnected(int(Params[2]),1,activator) else: message = "You are not allowed through this door. Access denied."