The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read


Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Thread Tools
Old Posted September 29th, 2012 (08:51 PM).
ChaosLord's Avatar
Game Dev Wanderer
Join Date: Nov 2010
Gender: Male
Nature: Bold
I've been trying to add some new Trainer Types of the same person(But in different outfits), all day today and always end up getting this weird error message;
Pokemon Essentials
Exception: RuntimeError

Message: Field is not a positive integer

File PBS/trainertypes.txt, line 1

Compiler:219:in `csvPosInt!'

Compiler:476:in `pbGetCsvRecord'

Compiler:472:in `each'

Compiler:472:in `pbGetCsvRecord'

Compiler:1330:in `pbCompileTrainers'

Compiler:1329:in `pbCompilerEachPreppedLine'

Compiler:632:in `each_line'

Compiler:632:in `pbCompilerEachPreppedLine'

Compiler:629:in `open'

Compiler:629:in `pbCompilerEachPreppedLine'

This exception was logged in ./errorlog.txt.

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

Been checking line 1 of Trainer Types and I can't really find any errors, all I did was place "1,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male" (Without quotations) about 4 times or so to show the different outfits. Putting it back again to the original PkMnTRAINER_male and PkMnTRAINER_Female seems to fix the problem, only it doesn't have the changes I wanted it to have, and editing the trainers would give me some stupid gsub class similar to this one;

Exception: NoMethodError Message: private method `gsub' called for nil:NilClass Compiler:2594:in `safequote' Compiler:3715:in `pbConvertToTrainerEvent' Compiler:2838:in `pbCompileTrainerEvents' Compiler:2833:in `each' Compiler:2833:in `pbCompileTrainerEvents' Compiler:2828:in `each' Compiler:2828:in `pbCompileTrainerEvents' Compiler:3938:in `pbCompileAllData' Compiler:4034

Only the one I have(Which I'm kinda too tired out to replicate right now considering it took me 4 Trainer Type tries, and 2 Meta data ones trying to solve this.) occurs right after I finish making a new Trainer Battle. The error ends up erasing my Trainer Types for some reason, then when trying to replace it with the old one, again, brings up the positive integer error from above like an annoying piece of a puzzle that constantly fits, then changes shape.
Reply With Quote
Old Posted September 30th, 2012 (11:34 AM).
FL's Avatar
Pokémon Island Creator
Join Date: Sep 2010
Gender: Male
Post the trainer types and the line before them.
Reply With Quote
Old Posted October 2nd, 2012 (12:59 PM).
ChaosLord's Avatar
Game Dev Wanderer
Join Date: Nov 2010
Gender: Male
Nature: Bold
# See the documentation on the wiki to learn how to edit this file.
0,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
1,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
2,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
3,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
4,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
5,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
6,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
7,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
8,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
9,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
10,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
11,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
12,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
13,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
14,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
15,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
16,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
17,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
18,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
19,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
20,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
21,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
22,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
23,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
24,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
25,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
26,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
27,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
28,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
29,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
30,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
31,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
32,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
33,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
34,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
35,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
36,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
37,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
38,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
39,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
40,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
41,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
42,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
43,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
44,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
45,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
46,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
47,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
48,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
49,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
50,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
51,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
52,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
53,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
54,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
55,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
56,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
57,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
58,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
59,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
60,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
61,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
62,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
63,PkMnTRAINER_Female,PkMn Trainer,100,,,,Female
64,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
65,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
66,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
67,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
68,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
69,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
70,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
71,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
Reply With Quote
Old Posted October 3rd, 2012 (04:18 AM).
FL's Avatar
Pokémon Island Creator
Join Date: Sep 2010
Gender: Male
You can't use the same internal name (the second parameter). Try something like:

0,PkMnTRAINER_Male,PkMn Trainer,100,,,,Male
1,PkMnTRAINER_Male_1,PkMn Trainer,100,,,,Male
2,PkMnTRAINER_Male_2,PkMn Trainer,100,,,,Male
3,PkMnTRAINER_Male_3,PkMn Trainer,100,,,,Male
And so on.
Reply With Quote
Old Posted October 3rd, 2012 (06:04 PM).
ChaosLord's Avatar
Game Dev Wanderer
Join Date: Nov 2010
Gender: Male
Nature: Bold
Simple answer I overlooked. But here's the error I get when going into the editor, escaping, and trying to save.

Pokemon Essentials
Exception: NoMethodError

Message: private method `gsub' called for nil:NilClass

PokemonEditor:32:in `get'

PokemonEditor:81:in `pbGetTrainerConst'

PokemonEditor:478:in `pbSaveTrainerTypes'

PokemonEditor:474:in `each'

PokemonEditor:474:in `pbSaveTrainerTypes'

PokemonEditor:471:in `open'

PokemonEditor:471:in `pbSaveTrainerTypes'

PokemonTrainers:71:in `pbConvertTrainerData'

PokemonEditor:3245:in `pbTrainerTypeEditorSave'

PokemonEditor:3829:in `pbTrainerTypeEditor'

This exception was logged in ./errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
Reply With Quote
Old Posted October 4th, 2012 (04:21 AM).
IceGod64's Avatar
My imagination.
Join Date: Oct 2008
Location: Castelia City
Age: 26
Gender: Male
Nature: Naive
Unfortunately, the editor is extremely buggy, and does randomly fault up.

There is no sure-fire fix, the best way to avoid too much trouble is to to back up all of your files in the PBS folder by making a Zip/Rar file containing them before your use the editor.

Reply With Quote
Old Posted October 4th, 2012 (06:02 AM).
Maruno's Avatar
Lead Dev of Pokémon Essentials
Join Date: Jan 2008
Location: England
That's a bug with the Editor, as IceGod64 says. Specifically, if you have created a new trainer type (or item) in the Editor and then try to save them to the appropriate PBS file, you'll get that error.

I've fixed this bug for v10. For now, I suggest you use Notepad and edit the PBS file directly, to create any new trainer types/items. Remember to compile them afterwards.
Reply With Quote
Old Posted October 4th, 2012 (12:53 PM).
ChaosLord's Avatar
Game Dev Wanderer
Join Date: Nov 2010
Gender: Male
Nature: Bold
I see, well thanks for all the help anyway.
Reply With Quote
Quick Reply

Sponsored Links
Thread Tools

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
Minimum Characters Per Post: 25

All times are UTC -8. The time now is 03:47 AM.

Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™,
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / Poké
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.