library question
billchelonis
27 Aug 2004, 10:12If you have a really large .ASL file and want to make it more readable by breaking it down into smaller "include" files (i.e. library files I guess), do you have to put the "!addto game" block for each room or can you do one "!addto game" and one "!end" and between those tags list a bunch of rooms?
I guess mainly why I want to do this is sometimes I'll get a compiler error where the .ASL file won't load at all and especially if I haven't worked on the code in awhile I have no idea where in the code the error is coming from, so if maybe I had smaller files I could figure out what file was most recently modified and therefor have a better idea where in the code the error was coming from. What's happening is sometimes the QDK seems to take long lines of code and split them in half and then I get an error message like this:
FATAL ERROR: Expected closing ) character in ...
I usually can find it in a text editor by using a search string but a line number also would be helpful to display with the above error.
I guess mainly why I want to do this is sometimes I'll get a compiler error where the .ASL file won't load at all and especially if I haven't worked on the code in awhile I have no idea where in the code the error is coming from, so if maybe I had smaller files I could figure out what file was most recently modified and therefor have a better idea where in the code the error was coming from. What's happening is sometimes the QDK seems to take long lines of code and split them in half and then I get an error message like this:
FATAL ERROR: Expected closing ) character in ...
I usually can find it in a text editor by using a search string but a line number also would be helpful to display with the above error.
billchelonis
27 Aug 2004, 10:26I noticed what I think is a bug in the way the compiler is reading "REM" statements.
If you put an open ( in a rem ' statement and no closing ) the game won't compile and/or load into the QDK.
Example:
command <#command1#, #command2#> {
' REM this is my rem statement ( and this is too
exec <#command1#>
exec <#command2#>
}
If you put an open ( in a rem ' statement and no closing ) the game won't compile and/or load into the QDK.
Example:
command <#command1#, #command2#> {
' REM this is my rem statement ( and this is too
exec <#command1#>
exec <#command2#>
}
007bond
28 Aug 2004, 00:37I like the idea. Have a separate folder for each game you make, then have a central ASL file, which links to separate files, one each for things like menus, procedures, text blocks, rooms and objects, etc. By breaking it down like this, it will be easier to spot errors. What we also need is a built-in text editor in QDK. This would help heaps in this sort of situation. And just off the topic a bit: A select case statement in ASL would do wonders, especially for games like the Millionaire one I'm making.
Anonymous
28 Aug 2004, 19:10Bill asked:
You may have (& I think *must* have) only one '!addto game' block for each individual library file. Whether you put one or one hundred rooms / object definitions within it is down to your way of working.
I like breaking things into smaller chunks this way because it makes for easier editing - not so much to scroll through at any one time - and it lets me keep related stuff together in discrete sections.
Al (MaDbRiT)
do you have to put the "!addto game" block for each room or can you do one "!addto game" and one "!end" and between those tags list a bunch of rooms?
You may have (& I think *must* have) only one '!addto game' block for each individual library file. Whether you put one or one hundred rooms / object definitions within it is down to your way of working.
I like breaking things into smaller chunks this way because it makes for easier editing - not so much to scroll through at any one time - and it lets me keep related stuff together in discrete sections.
Al (MaDbRiT)
Alex
28 Aug 2004, 21:34You don't need to have an "!addto game" block if you don't need one. Looking briefly at the Quest code, it looks like having multiple blocks would also work, although I can't see any reason why you'd want to do that.
007bond
29 Aug 2004, 01:57To make it easier to read, obvisouly