It seems you don't know the basics of the language. You should look at some tutorials. Here's what you were trying to do:
function letsCook()
{
%m = "I want to cook some pancakes.";
commandToServer('messageSent',%m);
%m = "What type of pancakes do you have in storage?";
commandToServer('messageSent',%m);
}