Author Topic: Cook (Chat) Script Won't Work  (Read 1542 times)

Hi, I was trying to make a super simple chat script

Code: [Select]
package Cook {

function Cook() {commandToServer('messageSent'"I feel like making pancakes.");}
function Cook() {commandToServer('messageSent'"What type of pancakes do you have in            storage?");}
};
activatePackage(Cook);

And so when I say Cook(); in the console I say "I feel like making pancakes." and then "What type of pancakes do you have in storage?"

Except it doesn't work.

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);
}

Thanks, elm. That worked
Is there any way to delay the messages?

schedule(2000, 0, "commandToServer", 'messageSent', "This is a delayed message.");

Schedule times are in ms by the way if you don't know that.

Schedule times are in ms by the way if you don't know that.

Really? Huh. I thought they were in microseconds. For the humor-blind: THIS IS A JOKE.

Really? Huh. I thought they were in microseconds. For the humor-blind: THIS IS A JOKE.
Yea they are e+100 seconds.

Yea they are e+100 seconds.
not sure if you're being serious or not 0_o

Really? Huh. I thought they were in microseconds. For the humor-blind: THIS IS A JOKE.
i thought they were in normal seconds!

that would explain my problems!