Adventure Game Studio | Forums

AGS Development => Site & Forum Reports => Topic started by: subspark on 06 May 2012, 10:17

Title: [BUG?] Unusual comment behavior?
Post by: subspark on 06 May 2012, 10:17
Game will not compile a bunch of critical functions are beneath a script with an open chunk of commented code.

To recreate exactly:
Create a script above your GlobalScript and put the following code in the header:

Code: [Select]
/*

Compile and... error!
I would imagine that the header i supposed to handle comment code identically to the general (asc) script.
Title: Re: [BUG?] Unusual comment behavior?
Post by: Khris on 07 May 2012, 00:20
Every .ash is put in front of all subsequent .ascs at compile time, so opening a comment block in a header will make everything further down a comment, too.

In other words, this is neither a bug nor unusual comment behavior but a layer 8 error.
Title: Re: [BUG?] Unusual comment behavior?
Post by: Calin Leafshade on 07 May 2012, 13:24
Why the hell would you open a comment, not close it and then expect no errors to result?
Title: Re: [BUG?] Unusual comment behavior?
Post by: monkey0506 on 07 May 2012, 21:21
Could maybe be handled better, but I agree that it's not a bug per se.
Title: Re: [BUG?] Unusual comment behavior?
Post by: Pumaman on 09 May 2012, 19:36
I think this is a bug in the script compiler. The fact that internally it assembles all the headers into a single script for compilation is an implemtntation detail that users shouldn't need to worry about.

You wouldn't expect an unclosed comment in one script to affect the behaviour of other scripts, so I think this is an (albeit low-priority) bug.
Title: Re: [BUG?] Unusual comment behavior?
Post by: subspark on 09 May 2012, 20:54
I remember being able to leave comments open - we had a script dedicated for notes once. It always worked before so it registered as a bug from my perspective.
I don't think anybody's in a rush for a fix for something so trivial. It gave me a big "???" moment for a few hours but it wasn't particularly difficult to track down.

Another one for the hit list at least.