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
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?
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.
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 the interaction editor, The thing is when it says there's a problem the script opens on that part of the script.
Can you copy the error message to show us?
(http://www.2dadventure.com/ags/dfhfdh.gif)
there ya go
There's one or more } missing from the end of the fucntion before those.