From 1f3a047dd1802c687bc6cc0d6a82ffcb51759588 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Fri, 1 Jul 2022 01:44:07 +0700 Subject: [PATCH] Change Command feature to report bad command name Before command feature did not report anything when user has entered a command name that doesn't exist. This commit fixes that issue. --- sources/Commands/Commands_Feature.uc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sources/Commands/Commands_Feature.uc b/sources/Commands/Commands_Feature.uc index ae25dfb..6d4c7a8 100644 --- a/sources/Commands/Commands_Feature.uc +++ b/sources/Commands/Commands_Feature.uc @@ -338,6 +338,14 @@ public final function HandleInput(Parser parser, EPlayer callerPlayer) parser.MUntilMany(commandName, commandDelimiters, true, true); commandInstance = GetCommand(commandName); + if ( commandInstance == none + && callerPlayer != none && callerPlayer.IsExistent()) + { + callerPlayer + .BorrowConsole() + .Flush() + .Say(F("{$TextFailure Command not found!}")); + } commandName.FreeSelf(); if (parser.Ok() && commandInstance != none) {