chatbotbios is a working function and is not the source of the issue.
How do you know this? It would be better if you posted your full code, so we could see exactly what wrong.
-coding snips-
TL;DR: I don't think the parent needs to returned, why are you calling a nonexistent function, and if you use
clientCmdChatMessage, it will run your code anytime anyone says anything on the server besides if it's empty. If you want only yourself to be able to use the chatbot, and no one else on the server to be able to use it, use
NMH_Type::Send(%this).
Are you actually calling a nonexistent function? I'm not sure, (this part has nothing to do with crashing, but rather, I'm fixing your code), but I don't think the parent needs to be returned. Maybe try calling the parent first and then do the rest of the stuff? Also, clientCmdChatMessage is what happens when anyone sends a chatmessage on the server you are on. So, anytime anyone says anything, if
chatbotbios(%msg); isn't empty, it will make you say whatever chatbotbios(%msg); is. For example, Blockhead1235785 says "Hello", (let's suppose your code actually works), and then your code runs, and returns chatbotbios("hello"); as "asdf". The commandToServer() part makes you send a chatmessage, but since chatbotbios(%msg); returns something (I'm assuming), you will say "asdf" everytime someone says "hello". If you want it to only happen when you say "hello" and chatbot says "asdf", you should use
NMH_Type::Send(%this); and work it out from there.