XML Invalid Question

I am trying to tidy up my tutorial and I was copy-pasting info to a new game. The plan is to make tutorials per section/topic area instead of piling all together as it currently is.

I copy-pasted code from 7 rooms over to a new game and tried to switch over to test it and what I feared would happen, happened... Go figure.

I got the following error when trying to switch over to the GUI. Invalid XML: The object start tag on line 435, position 4 does not match the end tag of asl line 669, position 3.

I'm sure I know the problem, but is there any way to search code by line number without counting 669 lines of code?! Or is there a specific 'something' I can type in the search bar to help locate the faulty line?

Thanks in advance!


Notepad+++ can count the line for you, but...
Quest counts long lines that wrap as one line...
But it should be able to get you in the ballpark...
As for the "position", I figured out that the position refers to the word or command, and multi-word commands count as one "word"...

As for tidying up the tutorial... yep, it needed it...
Your tutorial dives right into the game creation with out some start on the language first...
It's like training new people to drive in a formula 1 race car, 2 days before their first race...
(I think that is why so many new people crash and burn when they try to write anything with Quest.)

A first program should be the classic... "Hello world!"
Then loops, variables, input, output messages...
What are objects, how to use them...
OOP...
It is like the tutorial expects the new people to already be able to program with Quest.
It could be divided up by user's experience levels...
Level 1: new user (you mean I can create stuff this this!)
up to (about) 4... Your first game. (where your tutorial is)
I'm new to Quest... about 3 months(?), but I have worked with Basic since 1982 (ish).
I can help with the starter lessons, (suggest or write) as I learn this myself...

As for the Quest error messages...
It would be nice IF Quest, along with the existing error message, would display the line it has problems with.
(I know this is a developer fix...)
IE:
Invalid XML: The object start tag on line 435, position 4 does not match the end tag of asl line 669, position 3.
if (r=1) {
player.Wumpus = ToInt(StringListItem(player.Exit1,player.Wumpus))
}
(I know there is no error here, I just grabbed a line from my game)


Thanks for the reply and the suggestions. I never did find the error (after counting all the lines lol), but it would make sense that I never found it if Quest counts wrap around lines as one line. I got it working, however, by copy-pasting again and paying a little closer attention. I think the error might have been with exits that weren't yet existing in the copy-paste game. If that makes sense?!

I am going to start a thread on the Feedback Forum about the revised tutorial. I would appreciate it if you could copy-paste your applicable comments over to that thread. Thanks a ton!


DarkLizerd, I use Notepad++ a lot, and have always found that it numbers the lines the same. It counts long lines that wrap as 1 too.

One way to find XML errors is to rename your game so it ends .xml, and then open it up in a web browser. It will have a warning about no style information, but should display what it can in a hierarchy like you normally see on the left. Scroll to the end, and you will see an error where the XML is wrong and the browser gave up trying to understand it. This should show you where the error is and what it is too.


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

Support

Forums