• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

"Field is not a positive integer" error in items.txt

293
Posts
8
Years
  • Age 25
  • Seen Oct 1, 2020
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Field is not a positive integer

File PBS/items.txt, line 531







Compiler:411:in `csvPosInt!'

Compiler:490:in `pbGetCsvRecord'

Compiler:484:in `each'

Compiler:484:in `pbGetCsvRecord'

Compiler:1606:in `pbCompileItems'

Compiler:1605:in `pbCompilerEachCommentedLine'

Compiler:265:in `each_line'

Compiler:265:in `pbCompilerEachCommentedLine'

Compiler:262:in `open'

Compiler:262:in `pbCompilerEachCommentedLine'



This exception was logged in

C:\Users\OEM\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
 

Attachments

  • items.txt
    85.7 KB · Views: 44
1,403
Posts
9
Years
  • Seen Apr 10, 2024
Looks like 531 contains just a comma, which isn't a positive integer (whole number), i.e. ≥ 0.
 
1,748
Posts
14
Years
I believe (correct me if I'm wrong) that the Editor's item editor formats the file incorrectly. I did have the same error, though I didn't check to see if it was the Editor or not. (Editor as in Editor.exe)
 
293
Posts
8
Years
  • Age 25
  • Seen Oct 1, 2020
Another intreseting story.
Message: Field is not a positive integer
File PBS/items.txt, line 529


Compiler:411:in `csvPosInt!'
Compiler:490:in `pbGetCsvRecord'
Compiler:484:in `each'
Compiler:484:in `pbGetCsvRecord'
Compiler:1606:in `pbCompileItems'
Compiler:1605:in `pbCompilerEachCommentedLine'
Compiler:265:in `each_line'
Compiler:265:in `pbCompilerEachCommentedLine'
Compiler:262:in `open'
Compiler:262:in `pbCompilerEachCommentedLine'

The items.txt is at the bottom of my first post in this thread.

Another intreseting story.
Message: Field is not a positive integer
File PBS/items.txt, line 529


Compiler:411:in `csvPosInt!'
Compiler:490:in `pbGetCsvRecord'
Compiler:484:in `each'
Compiler:484:in `pbGetCsvRecord'
Compiler:1606:in `pbCompileItems'
Compiler:1605:in `pbCompilerEachCommentedLine'
Compiler:265:in `each_line'
Compiler:265:in `pbCompilerEachCommentedLine'
Compiler:262:in `open'
Compiler:262:in `pbCompilerEachCommentedLine'

The items.txt is at the bottom of my first post in this thread.
 

Attachments

  • items.txt
    85.7 KB · Views: 40
Last edited by a moderator:

Telemetius

Tele*
267
Posts
9
Years
528,ASSAULTVEST,Assault Vest,Assualt Vests,1,1000,An item to be held by a Pokémon. This offensive vest raises Sp. Def but prevents the use of status moves.,0,0,0,

Is missing these " "

Correct version:

528,ASSAULTVEST,Assault Vest,Assualt Vests,1,1000,"An item to be held by a Pokémon. This offensive vest raises Sp. Def but prevents the use of status moves.",0,0,0,



EDIT, same thing for:
526,SACHET,Sachet,Sachets,1,100,A sachet filled with fragrant perfumes that are just slightly too overwhelming. Yet it's loved by a certain Pokémon.,0,0,0,

591,JAWFOSSIL,Jaw Fossil,Jaw Fossils,1,1000,A fossil from a prehistoric Pokémon that once lived on the land. It looks as if it could be a piece of a large jaw.,0,0,0,

check if there are more of them.
 
1,748
Posts
14
Years
Alright, I finally got around to testing my hypothesis on an unmodified version of Essentials V16.1

Go into editor.exe and create a new item. Close out and reopen the editor and it should give the compile error.

The best way for me to describe the error is with an example;

Code:
Before adding a new item with Editor.exe:

1,REPEL,Repel,Repels,1,350,"An item that prevents weak wild Pokémon from appearing for 100 steps after its use.",2,0,0,

After adding a new item with Editor.exe:

1,REPEL,Repel,1,350,An item that prevents weak wild Pokémon from appearing for 100 steps after its use.,2,0,0,

In the example, there is no plural of "Repel" after the Editor modifies "items.txt". What does this mean? It means that the compiler treats "1" as the plural for Repel, the pocket as "350", and then the compiler throws an error as it's trying to read the description of Repel as a number (because it thinks it's setting the sell price of Repel).

The fix? I don't have a fix for the editor at the moment as I am too busy to go through it's code. But, a simple work around is to manually add items via "PBS/items.txt". (Which is not optimal in the end)

As for your error, start by either adding the plurals into your items file, or grab a clean and unmodified version of "items.txt" and re-add all the items you made manually.

Edit:

Actually, your error is completely different. Just remove all the blank lines from your "items.txt" and it should work. The compiler doesn't like lines that do not contain an entire item's information.
 
Last edited:
1
Posts
8
Years
  • Age 27
  • Seen Feb 7, 2016
I have the same problem. I tried to figure out what the problem is. So i deleted the items.txt file. And then the next problem were the berries file. And after that another. I think there is no solution for this problem.

But i know how to fix it. Just download and replace the whole PBS order and then it works. I don´t know why, but the main thing is that it works :D
 
1
Posts
6
Years
  • Age 28
  • Seen Jul 24, 2017
OH MY GOD I DID IT! I didnt checked anything, just removing the word: Repels weirdly it worked now. Everything is actual, so I hope I can help.

P.S.
Well NOW its great fun editing 2530 items. :(
 
971
Posts
7
Years
  • Age 21
  • Seen Nov 28, 2022
OH MY GOD I DID IT! I didnt checked anything, just removing the word: Repels weirdly it worked now. Everything is actual, so I hope I can help.

P.S.
Well NOW its great fun editing 2530 items. :(

If I may recommend, use the latest version of Pokémon Essentials; v16.2.
 
Back
Top