I don't know the first thing about coding, so I am a bit lost. I decided to try modifying the monster file today. Nothing elaborate, just a name change. When I first tried modifying it and opened Angband, I was told there was a parse error, and then the game closed down. I looked around the forum, and found that I might do better using Notepad++. So I downloaded that, and tried again. I didn't get the same error, which is perhaps an improvement, but I got another one saying "parser_getval error: name is name"; after I clicked OK the game again shut down. After further experimentation I found that there was no objection to my changing the monster description, but only the name. What am I doing wrong?
Parser error when modifying the monsters file
Collapse
X
-
-
-
Here I am, resurrecting my old thread. I tried to do the same kind of modifications as I referred to above in the latest edition of Angband, and I got a new parse error which could not be solved by deleting the lore. It says 'Parse error in monster line 1 column 1.'
Although someone could probably walk me through this and eventually solve my problems, I suspect it would take several botched attempts on my part, asking help on each one. I ca'n't help but think it would save time for all concerned if somebody was willing to make my changes for me and post the modified monster file. Would anybody be willing to bother? My thanks in advance to anyone who does.Comment
-
Firstly what are you using as your text editor? Mearly opening and saving with notepad will give you a parser error. With a decent editor you'll have line numbers, the fact that your error is on line 1 makes me suspicious your using an editor thats not right for the job.Comment
-
Although someone could probably walk me through this and eventually solve my problems, I suspect it would take several botched attempts on my part, asking help on each one. I ca'n't help but think it would save time for all concerned if somebody was willing to make my changes for me and post the modified monster file. Would anybody be willing to bother? My thanks in advance to anyone who does.Comment
-
We could make a deal where I edit your monster list for you and you do 100 push ups for me every morning but I suspect I wouldn't get any fitter and you'd be no better at changing edit files. I think I'll pass.
1) People on this forum are generally pretty helpful, and someone just might do it to be nice; and
2) I really do mess up so much trying to do this that whoever is instructing me would spend less time doing the whole thing himself than by telling me how to do so.
Anyway, there is certainly no pressure for you to do it. If I ever do go in for editing on a larger scale than a couple of names, I will of course have to get the hang of doing it for myself.
Try using Atom or Vscode or some other proper editor.
What i don't understand is that line 1 is a comment so theoretically it should be ignored by the parser, altough i don't know where the source file that contains the parser is.Comment
-
All good. Apologises if I came over as lecturing. I suspect you'll have an easier time finding someone who'll point out where you are going wrong rather then someone who'll do it for you. Though I can only speak for myself.
I also use notepad++. As someone who had a lot of parser errors themselves I'm just trying to rule out the mistakes I made myself. It might help if you upload the broken monster.txt I'm not making any promises, not great at this myself but I'd be willing to look & see if I can spot where you are going wrong.Comment
-
I'm glad we're on a friendly footing.
I suspect you'll have an easier time finding someone who'll point out where you are going wrong rather then someone who'll do it for you.
It might help if you upload the broken monster.txt I'm not making any promises, not great at this myself but I'd be willing to look & see if I can spot where you are going wrong.
I seem to be running into a difficulty, though. The forum limits the size of .txt files it will upload to 19.5 KB, so I ca'n't upload the whole file. I tried uploading only the modified pieces (and the opening, as it contains line 1), but Notepad++ appears to be saving the pieces as 'All Files' by default, and when I try to upload them, the forum pronounces them to be invalid files. When I try to save them as .txt files, they still come out as merely 'Files', and are still invalid to upload. Whatever am I doing wrong this time?Comment
-
I tried uploading only the modified pieces (and the opening, as it contains line 1), but Notepad++ appears to be saving the pieces as 'All Files' by default, and when I try to upload them, the forum pronounces them to be invalid files. When I try to save them as .txt files, they still come out as merely 'Files', and are still invalid to upload. Whatever am I doing wrong this time?
I don't have much experience in C programming but the parse error can come from invalid bytes in any language I guess and no matter if it's a comment line.
I think line 1 column 1 may mean a BOM (byte order mark) which the parser does not tolerate. But it's just guessing without seeing the file itself (and not knowing the parser code).Comment
-
Thank you, Pete. Here is the zip file, wobbly. Thank you again.Attached FilesComment
Comment