Note: This is a work in progress…
Occasionally we hear about a situation where the desktop version of Quest will not start. It has never happened to me, which makes finding the root cause very tricky, but for whatever reason Quest has got a double entry in the list of recently played or recently edited games. You might see an error message like this:
System.InvalidOperationException: An error occurred while creating the form. For more information, see Exception.InnerException. Error: An exception was thrown in the constructor call for the type 'GameBrowser.PlayBrowser' that matches the specified binding constraint. ---> System.Windows.Markup.XamlParseException: An exception was thrown in the constructor call for the type 'GameBrowser.PlayBrowser' that matches the specified binding constraint. ---> System.ArgumentException: An item with the same key has already been added.
Follow these steps (thanks Jay!):
We need to delete two keys, “Recent” and “EditorRecent” (in fact you only need to delete one; the former if the play browser is a problem, the latter if the edit browser is the problem, but if you are not sure it is safest to delete both). Right-click on the word “Recent” and then choose “Delete” from the popup menu. Choose yes to confirm. Do the same for “EditorRecent”. Close the Rededit program (no need to save).
Note that when you open Quest, the “recent” lists will be empty until you begin using Quest again, but that is preferable to not being to open Quest at all!
There are all sorts of problems that can arise as you code with Quest. Computer languagers are fussy things that expect you to type to very strict rules, and Quest is no different. Some things to check:
hitpointsin one place and
hit pointsin another and
Hit pointsin a third, it is not going to work)
return; if it is not “None” then there must be
The error messages usually come from deep in the Quest code, where things are not quite the same. If it is talking about an object, it probably means null. For example, if an attribute has not been set (so is null), you will see this:
Error running script: Object reference not set to an instance of an object.
If it means object, it may say “element”. Or object.
This can happen if you move the player in script on the room. Say you want to turn a player back from an exit. You might think it is a good to set up the script that runs on the destination room so it moves the player back to the original room. What happens is that the player is moved twice, and so Quest thinks it has to show the room description twice - and to add to the confusion, it does it for the current room, which will be where the player ends up.
The solution is to avoid moving the player on any of the built-in room scripts. In the example above, the script should be on the exit that goes to the destination, without moving the player at all.
Occasionally you may see this error:
Error running script: Error evaluating expression ‘(not GetBoolean(game.pov.parent, “visited”)) and HasScript(game.pov.parent, “beforefirstenter”)’: GetBoolean function expected object parameter but was passed ‘null’
This happens when the player’s “parent” attribute is set to null, and can happen if you try to move the player to a variable that has not been set (and Quest will think an object name you have mis-spelled to be a variable).
Sometimes Quest is clever and will warn you or take some action if you try to give something a bad name (if you try to add an object called “game” it will call it “game1”). However, there are other times it will not…
Quest automatically assigns names to anything you do not name yourself (for example, most of the exits in your game will have no name). It will name the first one K1, the second K2, and so on. What this means is that if you name anyhing in your game ‘K’ following by a number you are in danger of having a name collision!
You will probably never need them in a text adventure, but
pi are both mathematical constants. Quest will happily let you assign a value to them, but will ignore the assignment.
e = GetExitByLink (room, room2) msg (e) -> 2.71828182845905
This only applies to local variables, you can give these names to objects and attributes.
Trying to use any of these as the name of an attribute will confuse the editor. You will not get an error, but it will not do what you expect. You can use them as local variable and object names, but I would advise against it.
You can use attribute names with spaces in them for strings, number, objects and scripts, but not for lists or dictionaries.
Various attributes are already used by Quest. Do not do anything with “type” or “elementtype”. Obviously “name”, “parent”, “alias”, etc. have specific meanings in Quest, and trying to use them for something elkse will cause problems.