Login
Remember
IF Answers
Ask a Question

# Quest: Game won't open for edit?

0 votes
678 views
asked Jun 23 in Authoring by JennyKline

I've been working on a Quest game for about a month, and today have come to edit it, and it won't open. I get;

Failed to load game due to the following errors;
* Error: Error adding type 'editorroom' to element 'Crash Site': No element 'editorroom' of type 'ObjectType'

My previous edit didn't add much, or particularly change much. Crash Site is the starting room for the player.

If I could open the Quest file, I could undo anything I did, or at least save most of the harder work.

Does anyone know how I can get it to open, in any way?

And I can't give the code, as I can't get it to open at all D:

- quest
- error

## 1 Answer

0 votes
answered Jun 23 by hegemonkhan (161 points)
edited Jun 23 by hegemonkhan

you can directly open your game file itself (right click) with (opening your game file with) any text software (and see~get_to~copy your entire game~source code), such as with:

notepad, wordpad, notepad++ ( https://notepad-plus-plus.org/ ), apple: text editor, etc

and don't worry about your game file not opening into the GUI~Editor or not playing (don't let the errors scare you!), as it is just an error in the code ~ something that you've done wrong (usually a simple typo~mistake too), which can be fixed up, to be working fine again. We just need to troubleshoot what the issue is that is causing you game file to not work~open~load~etc (initialize).

there's two types of errors~issues~problems:

.1. the type that prevent you from opening up and~or playing a game file (unable to initialize~create~setup your game file by quest.exe into its GUI~Editor mode or play mode).

.2. the type that pops up during actual game play.

I'm not that familiar with the errors' error_codes that well, but maybe in your game code, try removing any of these lines that you see:

(also, maybe you just did a typo of these too ~ you don't have to remove them ~ just fix the typo'ed syntax of them to the below, which could be cause of your issue~problem~error)

    <inherit name="editor_room" />

    <inherit name="editor_object" />

    <inherit name="editor_player" />

and also any code blocks looking something like these:

    <type name="editor_room">
      // blah code lines
    </type>

    <type name="editor_object">
      // blah code lines
    </type>

    <type name="editor_player">
      // blah code lines
    </type>

as these are only for the GUI~Editor, and are suppose to be removed, when you actually play your game... but you still seem to have them, thus it prevents you from playing your game and~or opening up your game file into the editor mode.

commented Jun 23 by hegemonkhan (161 points)
err, actually it is saying that the error is with your 'crash site' Room Object.
the problem is that if the bad code isn't within the 'crash site' Room Object tag code block itself, if it is some scripts you have somehwere in your code that is doing this. We may need to see your entire game code to help you fix it up. If you want to keep it private than pm it to one the quest forum's mods, and they'll help you privately to fix up your game code. Else, if you don't care sharing your game code publically, you can post it here or on the quest forum, and we can fix it up for you.
-----
your 'crash site' Room Object, should look some somehting like this in code:
<object name="crash site">
// blah code lines
</object>
but again, the problem may be from some script elsewhere, and not actually within this code block.
commented Jun 23 by hegemonkhan (161 points)
edited Jun 23 by hegemonkhan
if you're interested in understanding~reading quest's code better (if you can't already):
any line or block with the encasing '<>' tags, that looks like these below:
horizontal:
<xxx>xxx</xxx>
~OR~
<xxx name="xxx">xxx</xxx>
~OR~
<xxx name="xxx" />
Vertical:
<xxx name="xxx">
// blah code lines
</xxx>
is (what I call) a 'creation tag code line~block', these are your actual 'physical things' in quest~your game file. (for some examples, these are your 'add object~function~verb~exit~attribute~etc' in the GUI~Editor)
-------------------
any lines~blocks without these encasing '<>' tags, are what I call 'scripting', these are your ACTION~EVENT code lines~blocks. (These are your 'add a~new script' circle buttons in the GUI~Editor), an example (the actual scripting lines~blocks are within the 'name_function' Function creation tag code block, so hopefully this doesn't confuse you, as the scripting can't actually exist unless it is inside of certain creation tag code block~line, such as a inside of a Function creation tag line block):
<function name="name_function">
msg ("What is your name?")
get input {
player.alias = result
msg ("Hi, {player.alias}, it is good to meet you.")
}
</function>
so the scripting (ACTION~EVENT code lines~blocks) would be this:
msg ("What is your name?")
get input {
player.alias = result
msg ("Hi, {player.alias}, it is good to meet you.")
}
notice how there's no encasing '<>' tags on these lines~blocks, unlike the Function creation tag block:
<function name="name_function">
// blah code lines
</function>

## Related questions

- For Quest: Is there a way to make a container open upon being hit by a certain object?
- No new game option for the online editor?
- How do I make verbs synonymous for only certain objects in Quest 5.6.1?
- Is there a way for me to have collapsed menus on startup in Quest?
- For Quest: Can A Template Return A Function?

...