I wrote it for the gist of the statement. And I believe throwing in one extra if at the beginning isn't going to make every experienced programmer hate it. So a few more characters, three more lines, and one more tab. Who cares about it that much?
I said hate in the case of
more than two conditions
But even in the case of only two conditions is still less than ideal. Neat code is code that not only does the same thing in the least amount of lines (without sacrificing readability, of course), but also the least number of columns, and adding an unneeded tab here and there adds more columns, especially if you use a text editor like notepad that has HUGE tabs
<download>
You don't need multiple beta testers for simple one-question-one-response chat bot. You test each question, see if it gives the appropriate response, and that's it
Also, if you're the only one who's going to be allowed access to the chatbot, don't use clientCmdChatMessage, instead use NMH_Type::Send(). This is the function that is called when you press enter with a message typed for chat, and thus you don't have to check the name of the sender:
package ChatBot
{
function NHM_Type::Send(%this)
{
%msg = %this.getValue();
if(%msg $= "Hello!")
//your bot's response here
}
};
ActivatePackage(ChatBot);
Also look into switches to replace many repeated if...else blocks
But for now I think you should practice on getting formatting and proper bracket usage right