Bugs, Errors & Whatnots
I think Im Dead
18 Nov 2006, 16:21Figured I'd start a general bugs and errors thread so things are a bit more organized than being tossed willy-nilly into the beta release thread. I encountered this error today when working on a Questnet Multiplayer game with 4.0, though I'm pretty sure it still happens with older versions of Quest as well.
When using a library to contain procedures used in the Description section of the game definition, I recieve a "Run-Time Error 9: Subscript out of range" error.
I've thoroughly checked my code, and while adding the libraries procedures to the main ASL file seems to remedy the problem, it still seems like a bug/error.
Here's some simplified code to prove and reproduce the problem.
ASL Code
Library Code
When using a library to contain procedures used in the Description section of the game definition, I recieve a "Run-Time Error 9: Subscript out of range" error.
I've thoroughly checked my code, and while adding the libraries procedures to the main ASL file seems to remedy the problem, it still seems like a bug/error.
Here's some simplified code to prove and reproduce the problem.
ASL Code
!include <display.lib>
!include <net.lib>
define game <Arena>
asl-version <390>
gametype multiplayer
start <arena>
game version <1.00>
game author <Alex Warren>
description {
do <display.msg>
}
end define
Library Code
!addto game
define procedure <display.msg>
msg <testing.|n>
end define
I think Im Dead
19 Nov 2006, 04:48Another bug I noticed was the dontprocess command doesn't appear to work. When attempting to use it in the beforeturn script for a multiplayer game, commands were still processed.
Some code to reproduce the problem.
Doesn't say in the documentation that the dontprocess doesn't work online, and if you use this code you can clearly see commands like look and move still get processed.
Some code to reproduce the problem.
beforeturn {
set numeric <number; $rand(1;2)$>
if property <player%userid%; netplayer> and ( %number% = 2 ) then {
dontprocess
msg <DENIED!!! %number%>
} else msg <APPROVED!! %number%>
}
Doesn't say in the documentation that the dontprocess doesn't work online, and if you use this code you can clearly see commands like look and move still get processed.
steve the gaming guy
21 Nov 2006, 16:21This is minor but it's something. In QDK, I'm trying to say that an object can be taken. When it is taken, I want a statement to be printed. Great.
Now on the lower half of this option screen, you get a Drop section where you can say this object can be dropped Everywhere or Nowhere. When I click one of these, the radio button is correctly highlighted for the option I chose. For example, I clicked 'Nowhere'. Great.
HOWEVER, when this is clicked, the highlighted button for "YES" (this object can be taken) disappears rendering this object as not takeable.
In other words, if you want your object to be taken, you don't get an option of how you want it to be dropped even though the QDK Inventory screen seems to give you the option.
EDIT:
Strike that. It seems to still work but you don't really know it's going to work until you play it.
Now on the lower half of this option screen, you get a Drop section where you can say this object can be dropped Everywhere or Nowhere. When I click one of these, the radio button is correctly highlighted for the option I chose. For example, I clicked 'Nowhere'. Great.
HOWEVER, when this is clicked, the highlighted button for "YES" (this object can be taken) disappears rendering this object as not takeable.
In other words, if you want your object to be taken, you don't get an option of how you want it to be dropped even though the QDK Inventory screen seems to give you the option.
EDIT:
Strike that. It seems to still work but you don't really know it's going to work until you play it.
Alex
21 Nov 2006, 16:27That take/drop bug in QDK is fixed in Beta 2.
ITID, I'll look into your bugs and report back here...
ITID, I'll look into your bugs and report back here...
Alex
21 Nov 2006, 17:39ITID:
You're getting a run-time error because your library isn't set up correctly. You have an "!addto game" which means everything below it gets added to the "define game" block, but you don't have a corresponding "!end", which is why Quest crashes.
You shouldn't have your procedure within "!addto game" anyway, as it's a block in its own right.
If you remove the "!addto game" line, you will find it works correctly.
I've reproduced and fixed the "dontprocess" not working in QuestNet for Beta 2.
You're getting a run-time error because your library isn't set up correctly. You have an "!addto game" which means everything below it gets added to the "define game" block, but you don't have a corresponding "!end", which is why Quest crashes.
You shouldn't have your procedure within "!addto game" anyway, as it's a block in its own right.
If you remove the "!addto game" line, you will find it works correctly.
I've reproduced and fixed the "dontprocess" not working in QuestNet for Beta 2.
steve the gaming guy
22 Nov 2006, 21:47Ok, here's something that's driving me up a wall. It's happened in a few spots but the basic bug is that if you add several actions or scripts on an object or in a room within QDK and then exit out of that object or room, there is a chance that when you come back to it, some of the actions or scripts have disappeared.
Sometimes it is gone forever and sometimes, boom, out of nowhere, they have returned. Specifically I am referring to the Script Editor screen where you can see your commands in the top box.
Sometimes it is gone forever and sometimes, boom, out of nowhere, they have returned. Specifically I am referring to the Script Editor screen where you can see your commands in the top box.
Alex
23 Nov 2006, 12:12Are you able to find a way to consistently reproduce the problem? It's not one I've spotted yet.
I think Im Dead
23 Nov 2006, 18:33Alex wrote:
If you remove the "!addto game" line, you will find it works correctly.
Oops, sorry, assumed every library had to have that line is all. Have to re-read that part of the docs. I'll try and abuse that new container system a fair bit this weekend.
I think Im Dead
24 Nov 2006, 03:47I made a quick room with a container in it, and the container opend and closed while in the room, but once I picked the object up and it was in my inventory, no "open backpack" or "open my backpack" worked to interact with it while in inventory.
Code as done by QDK
Code as done by QDK
define room <001>
alias <The Test Room>
look <You are in the center of an empty white test room.>
define object <container001>
alias <backpack>
look <You notice nothing special about it.>
take
prefix <a>
displaytype <Object>
article <it>
gender <it>
container
opened
open
close
add
remove
list empty <It's empty.>
list closed <It's closed.>
end define
end define
Alex
24 Nov 2006, 10:28Thanks, I'll take a look into this.
I think Im Dead
25 Nov 2006, 07:02I recently encountered a bug which crashed QDK. I went ahead and created a room, TestRoom, then decided, I wanted to call it TestRoom001, when I went to edit this in the name entryfield, as soon as I navigated away from that room, a message box with the usual, "You have changed a room, if other scripts are pointing to it you'll have to change them as well" deal, and then a runtime error 35601 'element not found' box would pop up and crash qdk. I haven't been able to faithfully reproduce this one though with other qdk games, but it happens with this tiny asl test file I use all the time.
qdk-file.asl
qdk-file.asl
Alex
25 Nov 2006, 11:11I've now updated the Beta 2 package to fix this, so if you download again and reinstall this should work properly.