dialog_request problem (run script in dialog mode)

Started by Alarconte, Tue 10/02/2004 01:44:17

Previous topic - Next topic

Alarconte

First, I say hello because it is my first time I post here, and second, I'm not a english speaker... I would say what I'mnt a good writer in your language.

Well, I have a problem and I haven't idea of solve it;

In a dialog, I put the command "run-script 1", and in the global script, I put

function dialog_request (int 1) {

and without "int" .... where is the problem? because the engine find a problem with the "1".

Can Anybody help me?

A lot of thanks ^^

strazer

Hi and welcome to the forums!

QuoteI'm not a english speaker... I would say what I'mnt a good writer in your language.

Don't worry. Many of us here are not native english speakers, myself included. :)

Quotethe engine find a problem with the "1".

Your dialog_request function should look like this:

function dialog_request (int parameter) {
 if (parameter==1) { // run-script 1
   // do stuff
 }
 else if (parameter==2) { // run-script 2
   // do stuff
 }
 // more else ifs if required...
}

Alarconte

Thanks a lot! It's work now... I don't control the global script yet :S

Weel, As reward, I put a screen about the game I'm making :P

(I know this isn't the forum, but is only a screen... Soon I announce the game, when I got a little demo.


LordHart

Reminds me of SQ2, which is always a good thing. Olleh! (the little greeting i always do, so i dont confuse you :)) and welcome to the AGS community.

SMF spam blocked by CleanTalk