Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: T-Pr on Wed 20/01/2010 21:35:06

Title: Nested Functions Not Supported (SOLVED)
Post by: T-Pr on Wed 20/01/2010 21:35:06
Hey guys,i was doing my game and i did my animations and i finished my game.But before these,i changed gui color,texts.Later i opened my game and i saw a error.I said,maybe it is because of gui . And i imported new gui from a new game.I did gui normal but the problem did not solve please help me. Maybe it's simple error,maybe i forget somewhere please help me ;

(http://i1001.hizliresim.com/2010/1/20/8615.jpg) (http://urlal.com/dqqf)

It's saying ''closing brace'' but i can't do anything.
Title: Re: Nested Functions Not Supperted
Post by: Dualnames on Wed 20/01/2010 21:38:17
That's the most common AGS error of all time. You have forgotten a }.
Put a { on line 210.

It would be wise if we could see the whole code of global script, to tell you exactly.
It's also wise to know that when the AGS engine sees this { it expects the number of these { to equal these }.
Title: Re: Nested Functions Not Supperted
Post by: T-Pr on Wed 20/01/2010 21:40:51
Ok ok,thanks for you,i solved the problem.Thanks :).
Title: Re: Nested Functions Not Supported
Post by: Atelier on Wed 20/01/2010 21:49:06
The new brace is back to front :D. Try this (and delete the { above the top line):


function on_mouse_click(MouseButton button)
{
   //Codes go here, inside the brackets.
   //Etc.
}


The {s go in pairs. If you have one opening '{', it must be matched at the end of the function with a '}'. It will highlight gold it you've done it right.

Edit @ above: Great.
Title: Re: Nested Functions Not Supported [ Solved ]
Post by: Khris on Wed 20/01/2010 21:56:32
The error was the } on line 216, I take it.