Author Topic: [BUG?] Unusual comment behavior?  (Read 1648 times)

subspark

  • Some things, you just can't unsee.
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with making music
    • I can help with play testing
    • I can help with proof reading
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • subspark worked on one or more games that won an AGS Award!
[BUG?] Unusual comment behavior?
« 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.

Re: [BUG?] Unusual comment behavior?
« Reply #1 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.
Fail at Floaty Rog' now!  still having to deal with what games are going through

Calin Leafshade

  • Long live King Cat!
    • I can help with making music
    • I can help with voice acting
    • Calin Leafshade worked on one or more games that won an AGS Award!
    •  
    • Calin Leafshade worked on one or more games that was nominated for an AGS Award!
Re: [BUG?] Unusual comment behavior?
« Reply #2 on: 07 May 2012, 13:24 »
Why the hell would you open a comment, not close it and then expect no errors to result?

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: [BUG?] Unusual comment behavior?
« Reply #3 on: 07 May 2012, 21:21 »
Could maybe be handled better, but I agree that it's not a bug per se.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: [BUG?] Unusual comment behavior?
« Reply #4 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.

subspark

  • Some things, you just can't unsee.
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with making music
    • I can help with play testing
    • I can help with proof reading
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
    • subspark worked on one or more games that won an AGS Award!
Re: [BUG?] Unusual comment behavior?
« Reply #5 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.