• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!

"Field '-1' is not a positive integer or 0" Help ;-;

savepoint

Rookie
Member
Joined
Mar 31, 2025
Posts
2
I was using essentials just doing some small stuff but I've put a solid week into this little game I'm making
and while I was using it I went into the trainers.txt file and changed the text for what displays when they lose, I didn't think much of it BUT
I happened to just get shot with two errors and I'm not sure why.. ;-;
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.6]

Exception: RuntimeError
Message: Field '-1' is not a positive integer or 0.
File PBS/pokemon_metrics.txt, section BUTTERFREE, key ShadowSize
-1



Backtrace:
[v21.1 Hotfixes] Compiler bug fixes.rb:16:in `cast_csv_value'
Compiler:724:in `block (2 levels) in get_csv_record'
Compiler:710:in `each'
Compiler:710:in `block in get_csv_record'
Compiler:708:in `loop'
Compiler:708:in `get_csv_record'
Compiler_CompilePBS:49:in `block (4 levels) in compile_PBS_file_generic'
Compiler_CompilePBS:31:in `each_key'
Compiler_CompilePBS:31:in `block (3 levels) in compile_PBS_file_generic'
Compiler:143:in `block in pbEachFileSection'

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.6]

Exception: RuntimeError
Message: Unknown exception when compiling.

Backtrace:
Compiler:1104:in `rescue in main'
Compiler:1031:in `main'
Main:29:in `mainFunctionDebug'
Main:18:in `block in mainFunction'
Errors:80:in `pbCriticalCode'
Main:18:in `mainFunction'
Main:45:in `block in <main>'
Main:44:in `loop'
Main:44:in `<main>'
-e:in `eval'

Could someone help out? ;-;
 
I was using essentials just doing some small stuff but I've put a solid week into this little game I'm making
and while I was using it I went into the trainers.txt file and changed the text for what displays when they lose, I didn't think much of it BUT
I happened to just get shot with two errors and I'm not sure why.. ;-;
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.6]

Exception: RuntimeError
Message: Field '-1' is not a positive integer or 0.
File PBS/pokemon_metrics.txt, section BUTTERFREE, key ShadowSize
-1



Backtrace:
[v21.1 Hotfixes] Compiler bug fixes.rb:16:in `cast_csv_value'
Compiler:724:in `block (2 levels) in get_csv_record'
Compiler:710:in `each'
Compiler:710:in `block in get_csv_record'
Compiler:708:in `loop'
Compiler:708:in `get_csv_record'
Compiler_CompilePBS:49:in `block (4 levels) in compile_PBS_file_generic'
Compiler_CompilePBS:31:in `each_key'
Compiler_CompilePBS:31:in `block (3 levels) in compile_PBS_file_generic'
Compiler:143:in `block in pbEachFileSection'

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.6]

Exception: RuntimeError
Message: Unknown exception when compiling.

Backtrace:
Compiler:1104:in `rescue in main'
Compiler:1031:in `main'
Main:29:in `mainFunctionDebug'
Main:18:in `block in mainFunction'
Errors:80:in `pbCriticalCode'
Main:18:in `mainFunction'
Main:45:in `block in <main>'
Main:44:in `loop'
Main:44:in `<main>'
-e:in `eval'

Could someone help out? ;-;
Sorry if you dont need help anymore but: All this means is you have to find the Pokemon Metrics pbs file, press ctrl and f and search "Butterfree"(or look manually, shouldn't be that far), and look for the '-1' in its shadow size and switch it to a non-negative number (Shadow size accepts 0 to 3 as a valid number). That should fix it. The second error is just saying "We couldn't finish compiling because we hit an error" because of the previous error.
 
Sorry if you dont need help anymore but: All this means is you have to find the Pokemon Metrics pbs file, press ctrl and f and search "Butterfree"(or look manually, shouldn't be that far), and look for the '-1' in its shadow size and switch it to a non-negative number (Shadow size accepts 0 to 3 as a valid number). That should fix it. The second error is just saying "We couldn't finish compiling because we hit an error" because of the previous error.
Thank you so much! It's solved the issue! I didn't have a backup so I thought it may have been hopeless it means a lot! :)
 
Back
Top