Newest Quest Not Compatible With Work In Progress 2012 Game

TextStories
A while back I had two games in the works, one for the normal text adventure genre and one for the Choose Your Own Adventure, both at about 90% complete or at least playable anyway. I was using an older version that was in 2012 or maybe even the version before that. Upgrading to 5.5.1 it says

Error running script: Unrecognised element 'span'


Error running script: Unrecognised element 'span'
Error running script: Unrecognised element 'div'
Error running script: Error compiling expression 'ListExclude(ScopeVisibleNotHeldNotScenery(), game.pov)': FunctionCallElement: Could find not function 'ListExclude(QuestList`1, Object)'
Sorry, an error occurred.
Object reference not set to an instance of an object.   at TextAdventures.Quest.WorldModel.UpdateObjectsList(String scope, ListType listType)   at TextAdventures.Quest.WorldModel.UpdateObjectsList()   at TextAdventures.Quest.WorldModel.UpdateLists()   at TextAdventures.Quest.WorldModel.b__12()


And says “Game Over This game has finished.” on the right hand side.

I would have thought when I updated Quest, it would be compatible with an older version. Also when I updated, it did not simply make my older Quest to the newer version. Instead I had the old one and the new one, with the newest not allowing me to play the games I was working on, but the old one did, but I could not download the newest games that I guess was made on the newer Quest game engine....

(Also there was a game I was trying to play that I thought I had something wrong with it. It kept telling me to roll the dice and buy an assortment of equipment and provisions, but I saw no online dice roller or things to click for equipment or how to even spend my gold... reading the author's notes I see you are suppose to use your own six sided dice and keep track of your stats... So never mind on that problem. :lol: )

So I decided to back up my game files for safe keeping and erased all of Quest and began from scratch, hoping that would fix the issue. It did not. (I am now at just 5.5 thinking maybe that would have helped, but it did not.) I know I could simply download an older version of Quest, hoping that would solve part of my problem, but it would not solve the main issue of others with updated versions being able to play it once mine are finished and as I said, both are nearly at least in Beta form anyway.

How do I go about fixing this? I only included the short message I received and not the game file itself. I am hoping there is a quick and simple fix to this and I am sure others have had similar issues with updated versions, but probably not as many finding out years later that there was a problem. I did search the first three pages and not sure what kind of key words to use in the search bar, so please bear with me. If what I provided does not help in showing the problem, then I shall go about it differently later. Thank you for your time and patience.

.........................................................................................................................................

Edit: After some changes to the code to fix- "list" becomes "simplestringlist" and "stringdictionary" becomes "simplestringdictionary", now when the game tries to load, it gives me a different message of-



Failed to load game.
The following errors occurred:
Error loading XML data for 'sheets.useon' - ensure that it contains no nested XML
Error loading XML data for 'sheets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.useon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'window.useon' - ensure that it contains no nested XML
Error loading XML data for 'Impa.ask' - ensure that it contains no nested XML
Error loading XML data for 'Impa.tell' - ensure that it contains no nested XML
Error loading XML data for 'Hans.ask' - ensure that it contains no nested XML
Error loading XML data for 'Hans.tell' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.useon' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'bed tied with impromtu escape rope.useon' - ensure that it contains no nested XML

Any suggestions?

jaynabonne
Be sure when you load the old game in 5.5 that you *save the game* in 5.5 before you run it. It's an odd thing, but it's necessary to upgrade the old file completely. I had the same message the other day with an old game, and that worked for me.

Pertex
And you should have a look at http://docs.textadventures.co.uk/quest/ ... notes.html

The Pixie
An issue I had, that I think causes the second of the two sympotoms you describe, is Quest changed how it reads list s from XML. Previously, if a list was tagged as:
type="list"

... then it would become a string list. Now it needs to be:
type="simplestringlist"

Opening the game in a text editor and searching for the former would be the best way to update the games.

It is just possible this will fix both errors (I have definitely seen them both).

TextStories
jaynabonne wrote:Be sure when you load the old game in 5.5 that you *save the game* in 5.5 before you run it. It's an odd thing, but it's necessary to upgrade the old file completely. I had the same message the other day with an old game, and that worked for me.


Hello. So you are saying I should copy the entire "old" game code as it is and simply paste it into this new version of 5.5 and then save it and it should work?

TextStories
Pertex wrote:And you should have a look at http://docs.textadventures.co.uk/quest/ ... notes.html


Well I think I am getting closer, I used both the link you provided and Pixie's suggestion of changing all "list" becomes "simplestringlist" and "stringdictionary" becomes "simplestringdictionary" and now the game tries to load, but gives me a different message of-



Failed to load game.
The following errors occurred:
Error loading XML data for 'sheets.useon' - ensure that it contains no nested XML
Error loading XML data for 'sheets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.useon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'window.useon' - ensure that it contains no nested XML
Error loading XML data for 'Impa.ask' - ensure that it contains no nested XML
Error loading XML data for 'Impa.tell' - ensure that it contains no nested XML
Error loading XML data for 'Hans.ask' - ensure that it contains no nested XML
Error loading XML data for 'Hans.tell' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.useon' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'bed tied with impromtu escape rope.useon' - ensure that it contains no nested XML

Looking more to your link it shows that-

the old text formatting XML is no longer relevant - use HTML instead. The only breaking change is there is no "color" tag in HTML

However, I do not know what or how to distinguish what a XML is from an HTML or what nested even means. (Assuming something with in something, but that doesn't explain what it is or how to correct the problem in my head.) Any suggestions? Also before I could load the game editor with all the tabs and look at the code with my initial problem, I just could not play the game.

Now that I fixed part of it, it would not allow me to get out of the “code” screen. I forced myself out and now I can not even get back into the editor. And a pop up box appears telling me everything I just posted above when I try to load it. How do I edit the code now? Find the specific folder it is hiding in and use Notepad? And if so, is it as easy as copying and pasting the altered code into the old code's place?

TextStories
The Pixie wrote:An issue I had, that I think causes the second of the two sympotoms you describe, is Quest changed how it reads list s from XML. Previously, if a list was tagged as:
type="list"

... then it would become a string list. Now it needs to be:
type="simplestringlist"

Opening the game in a text editor and searching for the former would be the best way to update the games.

It is just possible this will fix both errors (I have definitely seen them both).


Well I think I am getting closer, I used both yours and Pertex's suggestion of changing all "list" becomes "simplestringlist" and "stringdictionary" becomes "simplestringdictionary" and now the game tries to load, but gives me a different message of-



Failed to load game.
The following errors occurred:
Error loading XML data for 'sheets.useon' - ensure that it contains no nested XML
Error loading XML data for 'sheets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.useon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'window.useon' - ensure that it contains no nested XML
Error loading XML data for 'Impa.ask' - ensure that it contains no nested XML
Error loading XML data for 'Impa.tell' - ensure that it contains no nested XML
Error loading XML data for 'Hans.ask' - ensure that it contains no nested XML
Error loading XML data for 'Hans.tell' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.useon' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'bed tied with impromtu escape rope.useon' - ensure that it contains no nested XML

Looking more to the link Pertex posted it shows that-

the old text formatting XML is no longer relevant - use HTML instead. The only breaking change is there is no "color" tag in HTML

However, I do not know what or how to distinguish what a XML is from an HTML or what nested even means. (Assuming something with in something, but that doesn't explain what it is or how to correct the problem in my head.) Any suggestions? Also before I could load the game editor with all the tabs and look at the code with my initial problem, I just could not play the game.

Now that I fixed part of it, it would not allow me to get out of the “code” screen. I forced myself out and now I can not even get back into the editor. And a pop up box appears telling me everything I just posted above when I try to load it. How do I edit the code now? Find the specific folder it is hiding in and use Notepad? And if so, is it as easy as copying and pasting the altered code into the old code's place?

jaynabonne
TextStories wrote:

"jaynabonne"

Be sure when you load the old game in 5.5 that you *save the game* in 5.5 before you run it. It's an odd thing, but it's necessary to upgrade the old file completely. I had the same message the other day with an old game, and that worked for me.



Hello. So you are saying I should copy the entire "old" game code as it is and simply paste it into this new version of 5.5 and then save it and it should work?



I just mean: load the game into 5.5 and before you do anything else, hit Save. Then it should run properly (at least it did for me). It *should* in theory upgrade all your lists and things so you don't have to, though it sounds like it might not work on occasion...

Pertex
Perhaps you could upload your game file here so we could have a look at it?

TextStories
jaynabonne wrote:

"TextStories"

[quote="jaynabonne"]Be sure when you load the old game in 5.5 that you *save the game* in 5.5 before you run it. It's an odd thing, but it's necessary to upgrade the old file completely. I had the same message the other day with an old game, and that worked for me.



Hello. So you are saying I should copy the entire "old" game code as it is and simply paste it into this new version of 5.5 and then save it and it should work?



I just mean: load the game into 5.5 and before you do anything else, hit Save. Then it should run properly (at least it did for me). It *should* in theory upgrade all your lists and things so you don't have to, though it sounds like it might not work on occasion...[/quote]

Ok I did as you said and loaded my old game into a new game and saved it. If I leave the file as it was for <asl version="520"> it will just tell me about nesting again. However, when I alter the code as it shows in new coding for asl to be “550”, I only get one error message which reads-

Invalid XML character in the given coding. Line 55, position 82.

But I have no idea what constitutes a line or a position or even when to start counting them or when to skip over others if need be. Do I start at the very first line of code of asl or do I start further down? I will need to know this anyway for later on I am sure. Thank you.

TextStories
Pertex wrote:Perhaps you could upload your game file here so we could have a look at it?


Before I do that, I would just like to say that I followed Jaynaboone's suggestion and loaded my old game into a new game then saved it. If I leave the file as it was for <asl version=”520”> it will just tell me about nesting again. However, when I alter the code as it shows in new coding for asl to be “550”, I only get one error message which reads-

Invalid XML character in the given coding. Line 55, position 82.

But I have no idea what constitutes a line or a position or even when to start counting them or when to skip over others if need be. Do I start at the very first line of code of asl or do I start further down? I will need to know this anyway for later on I am sure. Thank you.

jaynabonne
Are you able to post your original game (as Pertex suggested)? That would be the easiest route.

HegemonKhan
when you used ' <asl version="520"> ', for your (preumably current download~install of quest) '550' version of quest.exe, it stopped right there, reporting that problem. When you changed it to "550", it's now able to continue to check your code lines, finding an error on line 55 position 82.

line 55 is literally your 55th line of your (code~text) file, and the position is your character space (starting from the left).

* I recommend you download notepad++ ( http://notepad-plus-plus.org/ ), as it's really useful. Once you got it up, choose for the (programming) language (bar at the top of the screen): XML

so for example (maybe it starts at zero instead of one, meh):

blah.aslx (your game file) 's contents, for pretend:

<asl>
hi my name is HK.
I love playing video games
</asl>


line 2 position 1: h
line 3 pos 1: I
line 2 pos 7: n
line 3 pos 14: g
line 3 pos 22: g

-----------------------

invalid xml character errors have three possible common mistakes (but there's many other mistakes too, these are probably just the most common ones), that you can see if these are the cause of your xml char error:

you used a ' < ' or ' > ' in your scripting lines without the ' <![CDATA[ scripts ]]> ' tag block

or, when writing a tag, such as ' <attr name="strength">0</attr> ', you forgot for example: to put in an ' = ' sign or you forgot the ' / ' in the ending tag (I do this all the time, argh!).

or, you used, for example with script lines: ' ( ' instead of ' { ', or you forgot to add the ending ' } ' ... (like I do a lot also, argh!)

---------------

opening up your game file with notepad++ (and then selecting for its programming language at the top bar: XML), makes trouble shooting much easier, as it color codes your code structure making it easier to spot mistakes.

notepad++ will tell you where (line and position) your curser is at in your game file, so it's easy to find the ' line 55 position 82 ' location in your game file's coding

TextStories
HegemonKhan wrote:when you used ' <asl version="520"> ', for your (preumably current download~install of quest) '550' version of quest.exe, it stopped right there, reporting that problem. When you changed it to "550", it's now able to continue to check your code lines, finding an error on line 55 position 82.

line 55 is literally your 55th line of your (code~text) file, and the position is your character space (starting from the left).

* I recommend you download notepad++ ( http://notepad-plus-plus.org/ ), as it's really useful. Once you got it up, choose for the (programming) language (bar at the top of the screen): XML

so for example (maybe it starts at zero instead of one, meh):

blah.aslx (your game file) 's contents, for pretend:

<asl>
hi my name is HK.
I love playing video games
</asl>


line 2 position 1: h
line 3 pos 1: I
line 2 pos 7: n
line 3 pos 14: g
line 3 pos 22: g

-----------------------

invalid xml character errors have three possible common mistakes (but there's many other mistakes too, these are probably just the most common ones), that you can see if these are the cause of your xml char error:

you used a ' < ' or ' > ' in your scripting lines without the ' <![CDATA[ scripts ]]> ' tag block

or, when writing a tag, such as ' <attr name="strength">0</attr> ', you forgot for example: to put in an ' = ' sign or you forgot the ' / ' in the ending tag (I do this all the time, argh!).

or, you used, for example with script lines: ' ( ' instead of ' { ', or you forgot to add the ending ' } ' ... (like I do a lot also, argh!)

---------------

opening up your game file with notepad++ (and then selecting for its programming language at the top bar: XML), makes trouble shooting much easier, as it color codes your code structure making it easier to spot mistakes.

notepad++ will tell you where (line and position) your curser is at in your game file, so it's easy to find the ' line 55 position 82 ' location in your game file's coding



Thank you for all that, although I could not find the positioning (At the bottom I see length, lines, Ln, Col, and Sel) of Notepad++ I could easily find the lines and then I just figured, after counting the first two problems, to scroll over and delete all " " marks and there was one line that just had ' or ; so I took them off as well...

After all that I am back to where I started-

Failed to load game.
The following errors occurred:
Error loading XML data for 'sheets.useon' - ensure that it contains no nested XML
Error loading XML data for 'sheets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.useon' - ensure that it contains no nested XML
Error loading XML data for 'blankets.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'window.useon' - ensure that it contains no nested XML
Error loading XML data for 'Impa.ask' - ensure that it contains no nested XML
Error loading XML data for 'Impa.tell' - ensure that it contains no nested XML
Error loading XML data for 'Hans.ask' - ensure that it contains no nested XML <----------------------------- Posted the code
Error loading XML data for 'Hans.tell' - ensure that it contains no nested XML
Error loading XML data for 'impromtu escape rope.useon' - ensure that it contains no nested XML <------ Posted the code
Error loading XML data for 'impromtu escape rope.selfuseon' - ensure that it contains no nested XML
Error loading XML data for 'bed tied with impromtu escape rope.useon' - ensure that it contains no nested XML

Here is just a snippet for the Hans issue. If maybe you can help me with that, I can find out how to fix the others. I am still not sure what makes something XML or HTML, although I did take a look at the rest of your post to me.


<object name="Hans">
<inherit name="editor_object" />
<inherit name="male" />
<look>He is the stable boy. You and him are about the same age. You have grown up together and you think he likes you a little. He is always nice to you anyway.</look>
<ask type="simplestringdictionary">
<item key="song whistling tune music">
msg ("I do not know exactly... I was finally able to go with the Stable Master to the Ranch south of here to inspect the horses for your father... err I mean the King..., and there was this cute young girl with deep blue eyes and hair as red as the sun and she was singing this song... the there horses there seemed to like it, one in particular and I learned it by listening to her. When I sing it or I should say whistle it... the horses here seem to like it as well.")
</item>
<item key="horses">
msg ("The horses are doing alright. Right now I am just getting them watered and brushed.")
</item>
<item key="your horse">
msg ("\"Snowy? He is a Beaut, much like her owner.\" You catch him winking at you. Had any one else of done that and you might had taken offense to it, but you have known him for as long as you can remember. And he continues, \"He will make a fine champion one day. His coat is as white as the winter's snow and is the product of two champions, one your father's and the other your mother's. Truly a gifted horse for a gifted rider...\"")
</item>
<item key="Jesse">
msg ("He should be on the Training Grounds training either the new recruits and or with his own Royal Guards. You know where that is right? It is located right next to us to the East. If standing in the Northern Courtyard, just simply go North and you are there. If he is not there you can most likely find him in the Royal Barracks or maybe he is out on patrol some where... being in the Royal Guard he never has to worry about mundane guard duty, but he has to do some pretty risky things that even the regular soldiers do not have to do unless at a time of actual war...")
</item>
<item key="dogs">
msg ("They are good. Some times they like to howl and or sing along to my whistling, but they seem to enjoy it as well. It is relaxing I think... soothing to the animals...")
</item>
</ask>



<object name="void">
<inherit name="editor_room" />
<object name="impromtu escape rope">
<inherit name="editor_object" />
<take />
<drop type="boolean">false</drop>
<useon type="simplestringdictionary">
<item key="bed">
msg ("You hastily tie the impromtu rope to the bed to secure this end...")
RemoveObject (impromtu escape rope)
RemoveObject (bed)
MoveObject (bed tied with impromtu escape rope, Your room)
</item>
</useon>
<selfuseon type="simplestringdictionary">
<item key="bed">
msg ("You hastily tie the impromtu rope to the bed to secure this end...")
RemoveObject (impromtu escape rope)
RemoveObject (bed)
MoveObject (bed tied with impromtu escape rope, Your room)
</item>
</selfuseon>
</object>
<object name="bed tied with impromtu escape rope">
<inherit name="editor_object" />
<useon type="simplestringdictionary">
<item key="window">
if (window.isopen) {
msg ("You put the rope out the window and climb down hurredly.")
wait {
}
}
else if (not window.isopen) {
msg ("You can not put the rope out the closed window...")
}
</item>
</useon>
</object>
</object>


I clearly see the useon and /selfuseon, but that tells me nothing how to fix it. Any suggestions? Thank you.

jaynabonne
The problem is that simplestringdictionary has a new format. Moroover, you seem to have scripts in your string dictionary, which looks like something bad has happened. I don't think replacing *all* lists and dictionaries with *simplestringXXX" was the right approach. They're not all string-based. Some have scripts, etc.

This might be a pain, but one way to do it which should work seamlessly is to load the game with successive versions of Quest. It's especially a pain as Quest versions don't live side by side.

1) Download and install Quest 5.3. Load the game and just save it. It should then be upgraded to 5.3.
2) Download and install Quest 5.4. Load the game and just save it. It should then be upgraded to 5.4.
3) Then go back to Quest 5.5. Load the game and save it. It should now be in 5.5 format.

The above will automatically update all your various dictionaries based on how they have changed over time. Otherwise, you'll have to do it all manually.

Simply changing the header from 5.2 to 5.5 is effectively lying to Quest. :) It's saying you have a file that is in a format that it's not.

The alternative is to post the file to someone (either here or in PM if you don't want the world to see it). Be sure to post the file before you made any changes to it, as the above suggests something has gone wrong already. It's going to be a bit tricky to try to help with only bits and pieces.

TextStories
I am not sure what is wrong with any of that script. To be honest I had forgot most of what I had learned a couple of years ago, plus it does not help matters any that the Quest system itself has updated and is not compatible in code with a few older versions. All I know is, I used exactly what was appropriate for what ever version of Quest I had at the time. Heck, I even played it on the older Quest I had a few days ago, before I deleted it and got the newer one. So it had to be working properly. And besides the script or code for roaming guards I got from someone, everything was handled with in the Quest drop down/add an object system. So why it looks like it should not work I have no idea. But then again, I do not read code.

I just fairly recently got back in Text Adventures and tried to look at TADS3. I saw the coding and was like, "Oh hell no!". Haha! :lol: So I am back. But now the problem is remembering what I had done in the first place and fixing the game to be able to run again and then add to it. Right now I am in the tutorial right after having scripts for turning on and off the TV. So I still have a ways to go. :wink: And I read where you have to add back slashes in between quotation marks... I do not remember having to do that before...

I will try your suggestion later for updating through out all the Quests, although it does sound like a bit of a pain. Or perhaps I will just post the code as you and Pertex had mentioned plus what the sticky asks. But I prefer to keep my game hush hush until it is completed. I assume any one can look at the code afterward anyway or at least the moderators, since how else can they search an entire game?

jaynabonne
If you do wish to continue forward with trying to fix it, then what I would do is keep the 5.5 in the header and then tackle each error. The way I would do that is to create a new empty game in Quest and re-create on a small scale each construct (e.g. a string list, a string dictionary, a script dictionary, whatever you use that is causing an error) and see how the new Quest formats it in the file. Then use that to change the format in your old game file to match. I can't tell you off the top of my head how to format a script dictionary, but Quest can. :)

TextStories
jaynabonne wrote:If you do wish to continue forward with trying to fix it, then what I would do is keep the 5.5 in the header and then tackle each error. The way I would do that is to create a new empty game in Quest and re-create on a small scale each construct (e.g. a string list, a string dictionary, a script dictionary, whatever you use that is causing an error) and see how the new Quest formats it in the file. Then use that to change the format in your old game file to match. I can't tell you off the top of my head how to format a script dictionary, but Quest can. :)


Yea, I might try that as well. I tried the other method you mentioned of going from one updated version to the next in a sequence, but that did not seem to work either. I could never get it working again as I once had and I have no idea why. I mean the game was working only a few days ago before I started messing around with updating the Quest system. Oh well... As I already mentioned I am still trying to relearn the system again and the newer one at that, so maybe that will give me time to figure out all I was trying to do. Plus I have other game ideas I can start from scratch with so we shall see. I just hope once those current errors are fixed, more wont pop up, since it tends to give me handfuls at a time. If nothing else, maybe I will just post my code to someone. Until then, thanks again. :D

TextStories
Well I finally got this game working again. I had thought about just starting from scratch and relearning all of it and doing it the proper way this time, although it was the proper way a couple of years ago... but that would of been a lot to redo so I simply started deleting all the errors I had. So far the game works as it was, minus those things I had to delete which were only a small handful of things anyway. The core of the game is still there. Now I will just go back and create those objects again and try to do them the way this new Quest wants them to be done. So thanks for every one who helped. I understand this would of been much quicker had I just simply posted the game/code for you all to look at and fix, but ehhh... Hopefully soon I can post my own beta of the game with 90% no errors and everything working properly. We shall see. Thanks again.


The Pixie
Something to be aware of is that if you have a script on an exit, in previous versions the script would always be used, but in recent versions you need to have runscript set to true for the script to be used.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums