Adventure Game Studio

AGS Development => Site & Forum Reports => Topic started by: subspark on Sun 06/05/2012 10:17:39

Title: [BUG?] Unusual comment behavior?
Post by: subspark on Sun 06/05/2012 10:17:39
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:


/*


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 Mon 07/05/2012 00:20:09
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 Mon 07/05/2012 13:24:37
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 Mon 07/05/2012 21:21:43
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 Wed 09/05/2012 19:36:50
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 Wed 09/05/2012 20:54:24
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.