Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Parser error when modifying the monsters file (http://angband.oook.cz/forum/showthread.php?t=9318)

Glorfindel March 17, 2019 03:53

Parser error when modifying the monsters file
 
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?

Glorfindel March 17, 2019 03:54

Oops, this was not supposed to be in the AAR! How do I move this into general Angband?:confused:

wobbly March 17, 2019 03:59

Look in the user directory and see if you have a lore file (where monster memory is kept). Try deleting that. You'll get parser errors if you have monster memory for a non-existant monster.

Nick March 17, 2019 04:10

Thread moved :)

Glorfindel March 17, 2019 05:38

Thank you. Problem solved. I'll miss the lore for a while, though.

Glorfindel October 22, 2019 09:26

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.

wobbly October 22, 2019 09:41

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.

wobbly October 22, 2019 09:54

Quote:

Originally Posted by Glorfindel (Post 140675)
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.

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.

Gauss October 22, 2019 10:29

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.

Glorfindel October 22, 2019 11:21

Quote:

Originally Posted by wobbly (Post 140676)
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.

I am using a program called 'Notepad++', which is distinct from 'Notepad', and which was at one time generally recommended on this forum as the best text editor for file editing in Angband. Here is the link.

Quote:

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.
I know that such a course of action as I have suggested would do nothing to improve my changing edit files, but all of my previous efforts have produced similarly incomprehensible errors. I am inclined to suspect that I am doing something so basically wrong that I would actually need some training in coding to even see what it is. At any rate, have no fear that I am looking on this as something I am entitled to. I just thought that

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.

Quote:

Try using Atom or Vscode or some other proper editor.
Do they have some advantage over Notepad++? I saw it being recommended in the first place as a 'proper editor' contrasting with Notepad in just the same way you seem to be advising Atom and Vscode, but I haven't had any real luck with it.

Quote:

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.
If you don't know, I am certainly helpless. I am a regular infant in my knowledge of these things.


All times are GMT +1. The time now is 05:28.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.