Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 22, 2019, 12:04   #11
wobbly
Prophet
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,618
wobbly will become famous soon enough
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.
wobbly is offline   Reply With Quote
Old October 22, 2019, 20:46   #12
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
I'm glad we're on a friendly footing.

Quote:
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.
Yeah, I never thought there was above a 50% chance of actually finding anyone who would do it all for me, but I thought it couldn't hurt to ask. I know that I probably wouldn't for someone else, just because it comes more naturally to tell someone how to do a thing like that then to do it oneself, even if it would actually be less work to do the latter.

Quote:
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.
This is kind of you. Thank you very much. It certainly sounds like it will be simpler than trying to locate the problem by back-and-forth on the forum.

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?
Glorfindel is offline   Reply With Quote
Old October 22, 2019, 21:10   #13
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
Pete Mack will become famous soon enough
Recommend forgetting about trimming and just upload the file as a .zip archive. The size limit is bigger, and the file size will be smaller.
Pete Mack is offline   Reply With Quote
Old October 22, 2019, 22:21   #14
Adam
Adept
 
Join Date: Feb 2016
Posts: 194
Adam is on a distinguished road
Quote:
Originally Posted by Glorfindel View Post
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?
In notepad++ it's not enough if you choose the file type to be text, you need to manually add the .txt file extension to the file name. Yes, it's a stupid thing - i agree. But actually Pete is right that you should zip the whole file and upload.

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).
Adam is offline   Reply With Quote
Old October 23, 2019, 08:05   #15
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
Thank you, Pete. Here is the zip file, wobbly. Thank you again.
Attached Files
File Type: zip monster.zip (64.9 KB, 181 views)
Glorfindel is offline   Reply With Quote
Old October 23, 2019, 09:48   #16
Pondlife
Apprentice
 
Join Date: Mar 2010
Location: UK
Posts: 78
Pondlife is on a distinguished road
It looks like the BOM (byte order mark) at the start of the text stream is causing the problem.

The first few lines of the original monster.txt from Angband 4.2 looks like this:

Code:
00000000: 2320 4669 6c65 3a20 6d6f 6e73 7465 722e  # File: monster.
00000010: 7478 740a 0a0a 2320 5468 6973 2066 696c  txt...# This fil
00000020: 6520 6973 2075 7365 6420 746f 2069 6e69  e is used to ini
00000030: 7469 616c 697a 6520 7468 6520 226d 6f6e  tialize the "mon
00000040: 7374 6572 2072 6163 6522 2069 6e66 6f72  ster race" infor
00000050: 6d61 7469 6f6e 2066 6f72 2041 6e67 6261  mation for Angba
00000060: 6e64 2e0a 0a23 2044 6f20 6e6f 7420 6d6f  nd...# Do not mo

Your monster.txt file in the zip file you posted looks like this. Note the 0xefbbbf at the beginning - this is the BOM encoded as UTF-8:

Code:
00000000: efbb bf23 2046 696c 653a 206d 6f6e 7374  ...# File: monst
00000010: 6572 2e74 7874 0a0a 0a23 2054 6869 7320  er.txt...# This
00000020: 6669 6c65 2069 7320 7573 6564 2074 6f20  file is used to
00000030: 696e 6974 6961 6c69 7a65 2074 6865 2022  initialize the "
00000040: 6d6f 6e73 7465 7220 7261 6365 2220 696e  monster race" in
00000050: 666f 726d 6174 696f 6e20 666f 7220 416e  formation for An
00000060: 6762 616e 642e 0a0a 2320 446f 206e 6f74  gband...# Do not
__________________
Playing roguelikes on and off since 1984.
rogue, hack, moria, nethack, angband & zangband.
Pondlife is offline   Reply With Quote
Old October 23, 2019, 12:29   #17
Adam
Adept
 
Join Date: Feb 2016
Posts: 194
Adam is on a distinguished road
What you need to do is simply open the file with notepad++ and Format/Encode in ANSI then save. After that it should work.
Adam is offline   Reply With Quote
Old October 23, 2019, 17:14   #18
Glorfindel
Apprentice
 
Glorfindel's Avatar
 
Join Date: Mar 2019
Posts: 62
Glorfindel is on a distinguished road
Thumbs up

It worked! And contrary to my experience so far, getting over this difficulty did not simply reveal a new error message! Thank you very much!

[edit] Not to say that your response to the problem I started the thread for was unhelpful. I just had a long series of failures when trying things on my own.
Glorfindel is offline   Reply With Quote
Old October 23, 2019, 17:43   #19
Gwarl
Knight
 
Join Date: Jan 2017
Posts: 963
Gwarl will become famous soon enough
I'm actually impressed by the response here, seems like a fairly obscure problem that would be easy to miss for a novice. It's not a problem I've encountered and it's good that we now have an answer ready for anyone to see.
Gwarl is offline   Reply With Quote
Old October 23, 2019, 18:11   #20
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
Pete Mack will become famous soon enough
Pretty common actually--I was guessing BOM too, but according to the notepad++ docs, the default encoding is supposed to apply only to new docs, not existing ones. In retrospect, I suspect what happened is that 'save as' is interpreted as a new doc.
Pete Mack 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 11:07.


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