![]() |
#11 |
Prophet
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,618
![]() |
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. |
![]() |
![]() |
![]() |
#12 | ||
Apprentice
Join Date: Mar 2019
Posts: 62
![]() |
I'm glad we're on a friendly footing.
Quote:
Quote:
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? |
||
![]() |
![]() |
![]() |
#13 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
![]() |
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.
|
![]() |
![]() |
![]() |
#14 | |
Adept
Join Date: Feb 2016
Posts: 194
![]() |
Quote:
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). |
|
![]() |
![]() |
![]() |
#15 |
Apprentice
Join Date: Mar 2019
Posts: 62
![]() |
Thank you, Pete. Here is the zip file, wobbly. Thank you again.
|
![]() |
![]() |
![]() |
#16 |
Apprentice
Join Date: Mar 2010
Location: UK
Posts: 78
![]() |
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. |
![]() |
![]() |
![]() |
#17 |
Adept
Join Date: Feb 2016
Posts: 194
![]() |
What you need to do is simply open the file with notepad++ and Format/Encode in ANSI then save. After that it should work.
|
![]() |
![]() |
![]() |
#18 |
Apprentice
Join Date: Mar 2019
Posts: 62
![]() |
![]()
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. |
![]() |
![]() |
![]() |
#19 |
Knight
Join Date: Jan 2017
Posts: 963
![]() |
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.
|
![]() |
![]() |
![]() |
#20 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,862
Donated: $40
![]() |
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.
|
![]() |
![]() |
![]() |
Tags |
error, modding, modifying |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 |