Author Topic: MY CODE IS NOT WORKING  (Read 2138 times)

HI I'M MAKING A CHATBOT PLZ HELP ME MY CODE IS NOT WORKING

Code: [Select]


    PACKAGE CHATBOAT
    {
            FUNCTION NHM_TYPE::SEND(%THIS)
            {
                    IF GETSUBSTR(%THIS.VALUE, 0, 6) $= "BOT SAY")
                    {
                            COMMANDTOSERVER("MESSAGESENT","BOT: ",GETSUBSTR(%THIS.VALUE , 6,STRLEN(%THIS.VALUE)));
                    }
                    ELSE IF(%THIS.VALUE, 0, 6) $= "BOT ADD")
                    {
                        COMMANDTOSERVER("MESSAGESENT","BOT: ", EVAL(%THIS));
                    }
                    ELSE IF(%THIS.VALUE, 0, 6) $= "BOT GREET")
                    {
                        SAYHI();
                    }
                    ELSE IF(%THIS.VALUE, 0, 6) $= "BOT POOP")
                    {
                        POOP();
                    }
                    ELSE
                    {
                            PARENT FUNCTION NHM_TYPE::SEND(%THIS);
                    }
            }
    };
    ACTIVATEPACKAGE(CHATBOAT);


This was a decent attempt, OP, but I didn't even chuckle

I think someone on these forums has a lot of spare keys lying around from the sales...

For starters, things like poop(); and sayhi(); are not even declared and you probably shouldn't make a function for each of them since you can do commandToServer('messageSent', "blah"); all on one line anyway

For starters, things like poop(); and sayhi(); are not even declared and you probably shouldn't make a function for each of them since you can do commandToServer('messageSent', "blah"); all on one line anyway
haha.... I'm pretty sure the op is joking

For starters, things like poop(); and sayhi(); are not even declared and you probably shouldn't make a function for each of them since you can do commandToServer('messageSent', "blah"); all on one line anyway

SO LIKE?

Code: [Select]
    PACKAGE CHATBOAT     {             FUNCTION NHM_TYPE::SEND(%THIS)             {                     IF GETSUBSTR(%THIS.VALUE, 0, 6) $= "BOT SAY")                     {                             COMMANDTOSERVER("MESSAGESENT","BOT: ",GETSUBSTR(%THIS.VALUE , 6,STRLEN(%THIS.VALUE)));                     }                     ELSE IF(%THIS.VALUE, 0, 6) $= "BOT ADD")                     {                         COMMANDTOSERVER("MESSAGESENT","BOT: ", EVAL(%THIS));                     }                     ELSE IF(%THIS.VALUE, 0, 6) $= "BOT GREET")                     {                         SAYHI();                     }                     ELSE IF(%THIS.VALUE, 0, 6) $= "BOT POOP")                     {                         POOP();                     }                     ELSE                     {                             PARENT FUNCTION NHM_TYPE::SEND(%THIS);                     }             }     };     ACTIVATEPACKAGE(CHATBOAT);
THAT?



I don't know, got me to laugh actually.


I didn't even chuckle
OP should be banned for being a moron.

Coding Help is a serious forum; no place for trolls like you to hang around.

I laughed at the second post of his in the topic

10/10 would laugh again.

OP should be banned for being a moron.

Coding Help is a serious forum; no place for trolls like you to hang around.
Calm your tits, it's only a joke!
you have no sense of humor

ambiguous topic name