Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old March 17, 2019, 04:53   #1
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
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 is offline   Reply With Quote
Old March 17, 2019, 04:54   #2
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
Oops, this was not supposed to be in the AAR! How do I move this into general Angband?
Glorfindel is offline   Reply With Quote
Old March 17, 2019, 04:59   #3
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,617
wobbly will become famous soon enough
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.
wobbly is offline   Reply With Quote
Old March 17, 2019, 05:10   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 58
Posts: 9,557
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
Thread moved
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 17, 2019, 06:38   #5
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
Thank you. Problem solved. I'll miss the lore for a while, though.
Glorfindel is offline   Reply With Quote
Old October 22, 2019, 09:26   #6
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
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.
Glorfindel is offline   Reply With Quote
Old October 22, 2019, 09:41   #7
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,617
wobbly will become famous soon enough
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 is offline   Reply With Quote
Old October 22, 2019, 09:54   #8
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,617
wobbly will become famous soon enough
Quote:
Originally Posted by Glorfindel View Post
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.
wobbly is offline   Reply With Quote
Old October 22, 2019, 10:29   #9
Gauss
Adept
 
Gauss's Avatar
 
Join Date: Aug 2018
Location: Barcelona
Posts: 110
Gauss is on a distinguished road
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.
Gauss is offline   Reply With Quote
Old October 22, 2019, 11:21   #10
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
Quote:
Originally Posted by wobbly View Post
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.
Glorfindel is offline   Reply With Quote
Reply

Tags
error, modding, modifying


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying Artifacts - Parse error? philly1919d Vanilla 9 November 23, 2017 09:36
Reusing the Angband parser Byrhtnoth Development 12 March 17, 2017 05:43
Error in monsters description TJS Development 4 July 31, 2010 13:00
Lua "obsolete file error", blargh Therem Harth ToME 4 July 4, 2010 14:02
File Dump Error Batanu44 Vanilla 2 October 13, 2009 00:01


All times are GMT +1. The time now is 09:33.


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