dialog request question

Started by LL Notorious B.I.G. Will C-H, Tue 20/05/2003 17:00:37

Previous topic - Next topic

LL Notorious B.I.G. Will C-H

how do you actually use the dialog request function in the main global script file? what im doing is this

function dialog_request (int 1) {
//my code here
}

using the command   run-script 1     in the actual dialog. is this right? well its obviously not cuz when i try and run the game it says Error (line 58); PE03: Parse error at '1'
its kindof had to tell what some of the stuff in the manual means. a lot of the functions have actual examples of what its meant to look like that you can copy and paste but in this case it just says    dialog_request (int parameter)   which makes it much harder to work out where youre going wrong.

any help with this much appreciated, cheers - will
Punk Quest 0.5 is now available for your perusal if you so wish http://punkquest.to-j.com

Scorpiorus

Yep, in the dialog script you use run-script 1 command. As about dialog_request() function you should organize it this way:

function dialog_request (int parameter) {

 if (parameter == 1) {
   // <...code here...>
 }

}

See? when you declare a function you need to use formal parameter name (parameter) instead of actual value.

-Cheers

LL Notorious B.I.G. Will C-H

lovely, thankyou ( i actually ended up doing a cop put method using different dialogs and whatnot, but ill know for next time)
cheers -will
Punk Quest 0.5 is now available for your perusal if you so wish http://punkquest.to-j.com

SMF spam blocked by CleanTalk