Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dikla on Tue 27/07/2004 22:16:26

Title: pls help!!! my inventory window does not close
Post by: dikla on Tue 27/07/2004 22:16:26
I tested my game and suddenly the inventory stuck.
i can open it and even look and use inventory items on inventory items, but when i want to close the buttons are not reacting. it's stuck. i tried everything. i tried to check the global script but it's ok and i did not touch it. i try the inventory gui (and checked with another game parameters of gui - but nothing. its ok). pls help me because now i am in PANIC.
dikla
Title: Re: pls help!!! my inventory window does not close
Post by: Fabiano on Tue 27/07/2004 22:21:54
hmn. the "OK" button from the inventory GUI are scripted to close it?
Title: Re: pls help!!! my inventory window does not close
Post by: dikla on Tue 27/07/2004 22:25:35
I dont understand what you mean?
it was ok all the time i tried to test it.
this is the script in gloabl script
if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }
Title: Re: pls help!!! my inventory window does not close
Post by: on Wed 28/07/2004 04:43:23
just a question, is that script in on_interface_click?? Just wondering... If so I don't know what the problem is...
Title: Re: pls help!!! my inventory window does not close
Post by: Gilbert on Wed 28/07/2004 08:30:22
Like asked in the other thread, is that button set to "Run Script" on clicks? Had you checked that?
Otherwise it can just be some error in putting teh braces in the codes which prevents that part from working.
Title: Re: pls help!!! my inventory window does not close- solved
Post by: dikla on Wed 28/07/2004 11:33:36
i double check the "run script" and its ok. the command for close inventory is in the above post and if brace is missing theÃ,  ags would not let me close and save, isnt it?
if you like i will type and paste whats written in my global script concerning the inventory.
tx

dikla

bty monkey 0506 indeed on ifterface click there was a slider ugi but now i deleted it from all the places (even the commands within the room). may be it would help.

by your help fixed it. i just copied text from another new game and paste it, and now its ok. tks
Title: Re: pls help!!! my inventory window does not close
Post by: Gilbert on Thu 29/07/2004 02:21:02
By errors in placement of braces I didn't just mean missing a brace or two, it can also be an structural error (like say:

if (a==1){
  //blah bla
  if (a==2) {
    //bla bla
  }
}

That teh (a==2) part will never be executed.)
Also, if you delete something the GUI buttons or GUI number may be rearranged, so you may need to fix the codes.

Anyway, glad to hear your problem was fixed.