Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 10/02/2004 01:44:17

Title: dialog_request problem (run script in dialog mode)
Post by: on Tue 10/02/2004 01:44:17
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 ^^
Title: Re:dialog_request problem (run script in dialog mode)
Post by: strazer on Tue 10/02/2004 01:50:41
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...
}
Title: Re:dialog_request problem (run script in dialog mode)
Post by: on Tue 10/02/2004 02:23:03
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.

(http://usuarios.lycos.es/pubelsuspiro/fotos/darkav1.jpg)
Title: Re:dialog_request problem (run script in dialog mode)
Post by: LordHart on Wed 11/02/2004 02:16:50
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.