Axe Software Forums
  Quest Developer Forum
  Comments in asl file.(possible bug)


Author Topic:   Comments in asl file.(possible bug)
gamer1962 posted 23-10-2002 19:54 GMT     
I have been commenting in my game file using the ' at the beginning of the line. If I edit the file in QDK pro and save it I loose the comments. Is this a bug or am I doing something wrong
Alex posted 24-10-2002 09:24 GMT          
QDK discards comments as there's no way of viewing them in QDK, and since your ASL file gets rearranged (slightly) by QDK, you may find your comments ending up in the wrong place. What are you using the comments for? If you're using them for a particular purpose then I can add some QDK functionality for it, e.g. if you're writing internal notes to yourself about particular rooms, I could add a bit to the Room Properties window where you can type/edit internal notes, saved as comments. I quite like this idea anyway actually - one for the "to do" list!
gamer1962 posted 28-10-2002 04:51 GMT          
I actually use them as reference for my self once the code gets to be alot of lines so I remember what certain variables or statements apply too. Plus when you are working with new code and in forums, commented code is alot easier to learn from. I like your idea of the comments on each room although I primarily have comments a in regards to commands or procedures.
Alex posted 28-10-2002 14:12 GMT          
Comments for a particular ASL command within a definition block would actually be quite a difficult thing to keep together, as there's no way of telling what a particular comment is commenting on - and since QDK pays no attention to the order in which things appear when loading an ASL file, it would be impossible for QDK to guess the correct order to save comments in when saving the file. I suppose there might be ways around it, although it would be difficult to implement - and there are far more compelling features I want to add first!
gamer1962 posted 30-10-2002 03:33 GMT          
Understood. Thanks Alex
HaDel posted 30-10-2002 23:43 GMT          
A suggestion if I may...

I am a Delphi man. There, in the BDE, each component has a property called "Tag".
Description

"
Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer."

What about the option to add such a thing in the QDK, which can point to a file position with the user comments...

Or it could be a separate (4-th) tab in each Object definition/edit window, plus a pop-up for the function/procedure window...

BUt I guess, people could live with a separate editor beside the QDK...

Alex posted 31-10-2002 22:52 GMT          
Yes, that would be one way to do what I'm proposing - a separate part of the Room Properties window where the game author can enter "internal" information to him/herself about that room, where you could write yourself a "to do" list or whatever.
Computer Whizz posted 01-11-2002 02:04 GMT          
As far as "saving" files goes, you CAN put comments into your ASL code...

All you need to do is put in an "other script command" and type ' and then your comment...

QDK saves it perfectly in place...

The only problem is when you come to re-load it again, QDK just ignores the ' and so dumps them into no-where land...

Computer Whizz