Hi Ponnfar,
I might be stumped! However, one possibility does come to mind.
You mentioned that you cut and pasted to put the code into a new brain. Are you absolutely, positively certain that the brain you are talking to is the same brain that you edited?
Remember, when you create a new control-script .uhp "brain," you must take care of naming it in TWO places. It must have a unique file name in the computer's file system, with the correct file extension .uhp (and file extensions are set to be invisible in many people's computers, thank you so much Microsoft, NOT)!
The SECOND name you must take care of is the DISPLAY NAME. This is controlled by the second line of the script. Whatever you put after the equals sign will be shown in the choice list in Hal's control panel.
When making new brains, it's very easy to edit one brain, and by accident be running a different one while talking to Hal.
Verify that the brain you edited is actually the active brain by going in "live" and inserting a line of code, such as the following, near the end of the "GetResponse" function:
GetResponse = "Yup, we're running the correct brain."
Then hit "save" and toggle to Hal. Say "Hi" to Hal and see if he responds with "Yup, we're running the correct brain."
Once we establish that you're running the brain that you think you're running, we can continue to ponder why the otherwise okay-looking code seems to be doing nothing.
Sincerely,
Don