[BUG?] Unusual comment behavior?

Started by subspark, Sun 06/05/2012 10:17:39

Previous topic - Next topic

subspark

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: ags

/*


Compile and... error!
I would imagine that the header i supposed to handle comment code identically to the general (asc) script.

Khris

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.

Calin Leafshade

Why the hell would you open a comment, not close it and then expect no errors to result?

monkey0506

Could maybe be handled better, but I agree that it's not a bug per se.

Pumaman

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.

subspark

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.

SMF spam blocked by CleanTalk