Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mozza on Fri 16/12/2005 00:46:35

Title: Scripting problem: unexpected eof [SOLVED]
Post by: mozza on Fri 16/12/2005 00:46:35
I was writing some code for a cutscene in my game when this error occured.
(http://www.geocities.com/mozza_26/pics/errors/scripteof.PNG)

This is my code:
StartCutscene(eSkipESCOnly);
player.FaceCharacter(cMum,eBlock);
character[MUM].Say("Dum dee dee da da. Doo doo doo.");
player.Walk(175, 155,eNoBlock);
player.Say("Finally I've got a free afternoon to go vandalise the school with my friends.");
character[MUM].Say("I love cooking, I love my cooking.");
player.Walk(70, 120, eBlock);
character[MUM].FaceCharacter(player, eBlock);
character[MUM].Say("And just WHAT do you think you're doing?");
player.Say("Uh-oh.");
player.FaceCharacter(cMum, eBlock);
player.Say("Uhh, I'm just going to .. ah.. go out with my friends. Yeah, that one.");
character[MUM].Say("Okay. But be back before sundown.");
character[MUM].Say("And DO NOT get into any mischief.");
character[MUM].Say("Yes, mum.");
character[MUM].FaceLocation(105, 115,eBlock);
player.Walk(25,180,eBlock);
player.Say("Yeah, right!);
player.ChangeRoom(1, 1, 1);
EndCutscene();


What is causing the problem and how do I fix it?
Thanks.
Title: Re: Scripting problem: unexpected eof
Post by: Ashen on Fri 16/12/2005 00:51:01
'unexpected eof' errors generally mean you've missed a ", a ( or a ) out somewhere, and you'll have to go through every line to figure out where.

In your case it's down near the end :

player.Say("Yeah, right!);


Needs another " (player.Say("Yeah, right");).
Title: Re: Scripting problem: unexpected eof
Post by: mozza on Fri 16/12/2005 00:54:15
Thanks a lot Ashen. I searched the code but I must have missed it.
Title: Re: Scripting problem: unexpected eof [SOLVED]
Post by: Play_Pretend on Sun 18/12/2005 08:28:38
Oh thank gods to you too, Ashen.  I was stumped for two hours by the same error, and couldn't figure it out.  Woo!  What a load off. :)