problem with quit gui

Started by Chicky, Wed 26/05/2004 13:36:33

Previous topic - Next topic

Chicky

hey, im making a quit gui for my mags game. This is my first game so im teh n00b when it comes to scripting.

tell me, whats wrong with this script

 
  if (interface == QUIT) {
   
   if (button == 0) {
     
     QuitGame (0) ;
     }

if (button == 1) {
   
   GUIOff (3) ;
   }
}


cheers

Ishmael

Nothing, if you have the buttons set to "Run Script" on left-click, and the "Yes" button is GUI object 0, and the "No" button is GUI object 1...

You sure you have all the brackets right? So that you're not nesting that inside another if (interface == ) conditional?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Chicky

new problem,

function inventory6_a() {
  // script for inventory6: Use inventory on this item
AddInventory (7) ;

LoseInventory (2) ;

LoseInventory (6) ;
}

function inventory2_a() {
  // script for inventory2: Use inventory on this item
AddInventory (7) ;

LoseInventory (2) ;

LoseInventory (6) ; 
}


it says there's a problem, but i cant see it.

Ishmael

nothing seems to be wrong there either... unless you just typed those into the global script, instead of using the interaction editor for the inventory items...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Chicky

i used the interaction editor, The thing is when it says there's a problem the script opens on that part of the script.

Ishmael

Can you copy the error message to show us?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Chicky


Ishmael

There's one or more } missing from the end of the fucntion before those.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk