Sorry I forgot to mention I tried a ";" after the original didnt work, but I tried the code I am not sure if this is right but I after I click the button to close it and I click the button to open the menu it doesn't open again.

Code:
PANEL* inventory_main =
{
  bmap = "main.pcx";
  pos_x = 90;     
  pos_y = 0;    
  button (90, 154, "medkit3.png", "medkit1.png", "medkit2.png", give_health, NULL, NULL); 
  button (90, 284, "medkit3.png", "medkit1.png", "medkit2.png", give_health2, NULL, NULL);
  button (670, 75, "quit_clicked.png", "quit_normal.png", "quit_hover.png", hide_inv, NULL, NULL);
  flags = OVERLAY;
  }

function hide_inv()
{
  if(inventory_main.flags & VISIBLE)
{
pan_remove(inventory_main);	
}
}



Last edited by JakeBilbe; 06/05/11 17:04.