Ã, // script for room: Player enters screen (after fadein)
if (character[GetPlayerCharacter()].inv[1] > 0) {Ã,Â
Ã, Ã, Display("Jeremy, I believe you have everything.");
Ã, Ã, }
if (character[GetPlayerCharacter()].inv[1] == 0) {
Ã, Display("Jeremy, I think you missed something.");
Ã, }
if (character[GetPlayerCharacter()].inv[1] == 0) {
Ã, Display("If only there were some way you could go back in time and get what you needed...");
Ã, }
Maybe I'm blind, but I'm getting this error: "Function still open, missing }"
check with the room script that the function's end } has not gotten lost anyhow...
Hahah. I looked at the room script, and added a } at the end and it works now. I noticed before that it usually added one at the end. I wonder how it got lost this time...
Sorry for being such a n00b at scripting. I'm just trying to script every type of situation possible in my mini/test-game thing before I start on my real game.
That's where we all start, asking n00bish questions, and learning. :)
This happens... when you make a mistake, try to save a room and AGS suggests you to fix the script. then it goes to the room's whole script, not to particular object/hotspot's one.
And this is where all hotspot/object scripts are, in extra brackets to separate each other, which you may accidentally erase and get this otherwise strange looking error.
Right?
There is a wonderful 'Match brace' feature in the AGS script editor. Just put a cursor near a brace and choose from the menu Edit > Match brace (or simply hit Ctrl-B). It will mark the text and show you the whole block.