• 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.

Error when adding new species

8
Posts
10
Years
    • Seen Apr 21, 2015
    Creating a new pokemon game, using 100-115 brand new originals.
    Did 3 to test and seemed to work fine, but started adding in more and now i am getting this message:
    Exception: RuntimeError
    Message: Bad line syntax (expected syntax like XXX=YYY)
    File PBS/pokemon.txt, section 5, key WildItemRare


    Compiler:1563:in `pbEachFileSectionEx'
    Compiler:1546:in `each_line'
    Compiler:1546:in `pbEachFileSectionEx'
    Compiler:1584:in `pbEachFileSection'
    Compiler:2078:in `pbCompilePokemonData'
    Compiler:2076:in `open'
    Compiler:2076:in `pbCompilePokemonData'
    Compiler:3811:in `pbCompileAllData'
    Compiler:3939

    can anyone help with this at all?
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Creating a new pokemon game, using 100-115 brand new originals.
    Did 3 to test and seemed to work fine, but started adding in more and now i am getting this message:
    Exception: RuntimeError
    Message: Bad line syntax (expected syntax like XXX=YYY)
    File PBS/pokemon.txt, section 5, key WildItemRare


    Compiler:1563:in `pbEachFileSectionEx'
    Compiler:1546:in `each_line'
    Compiler:1546:in `pbEachFileSectionEx'
    Compiler:1584:in `pbEachFileSection'
    Compiler:2078:in `pbCompilePokemonData'
    Compiler:2076:in `open'
    Compiler:2076:in `pbCompilePokemonData'
    Compiler:3811:in `pbCompileAllData'
    Compiler:3939

    can anyone help with this at all?

    I would make sure that if you're adding pokémon species, you add the sprites for them in the Graphics/Battlers directory. You will need to do so in the correct format. You also need to make sure there aren't any mistakes in the pokémon.txt. For me it is usually a stupid comma somewhere. Cross check the format with other pokémon already programmed in. Also, the dex number could be switched, they use XXX format. Hope I helped.

    Here is the URL to the essentials page to help you out:
    https://pokemonessentials.wikia.com/wiki/Defining_a_species
     
    8
    Posts
    10
    Years
    • Seen Apr 21, 2015
    thank you very much for your help. the link is very informative.
    I have looked over the whole of 'section 12' which i presume is the pokemon [12] that will be on the list?
    i've even re-copied and edited the example but don't understand what the error is? it keeps mentioning the 'wilditemrare' but this is optional and i have taken off so it isn't even there???

    *confused.com haha*
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    The problem with errors from pokemon.txt, is that they are never as specific as they should be.
    The problem could possibly be --->after<--- Pokémon 12... What it's saying is, the game expects WILDITEMRARE... The error could be something simple as
    TYPE1=FRIE
    or
    TYPE=FIRE
    or as complicated as missing a line, like base stats.
    You will have to check over all your newly added Pokémon... Make sure they all have the correct spelling and lines, obviously the optional stuff isn't necessary.
     
    8
    Posts
    10
    Years
    • Seen Apr 21, 2015
    Thank you for your help, and you are probably right, it may be a comma somewhere.
    I have been looking for hours and still cannot find anything different from the working lines to these - cross checked them and checked spelling of all moves, abilities and repetition of name usage for individual pokemon.
    All of them were copied/paste and then edit from working ones too.

    The 'WILDITEMRARE' is still bugging me though as I keep feeling like I need to put that it to shut it up!!!
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    It mentions WildItemRare because that's the last property defined in the compiler scripts. Don't worry about it. What it means is that it's not found a property that needs to exist, or something has a typo.

    The section number itself is also a bit of a touchy issue. It might be 12, it might be 11 or 13 (yes, it refers to the stuff immediately after the line with that number in square brackets). I've never really gotten the hang of how those error messages work, but at least they're better than nothing.
     
    8
    Posts
    10
    Years
    • Seen Apr 21, 2015
    Below is what I've got down so far and just been going over it before adding anything else

    Spoiler:
     
    Last edited by a moderator:

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Below is what I've got down so far and just been going over it before adding anything else

    Spoiler:
    Spoiler:


    Here is an excerpt from the standard pokemon.txt for the pokemon Snorlax:

    [143]
    Name=Snorlax
    InternalName=SNORLAX
    Type1=NORMAL
    BaseStats=160,110,65,30,65,110
    GenderRate=FemaleOneEighth
    GrowthRate=Slow
    BaseEXP=189
    EffortPoints=2,0,0,0,0,0
    Rareness=25
    Happiness=70
    Abilities=IMMUNITY,THICKFAT
    HiddenAbility=GLUTTONY
    Moves=1,TACKLE,4,DEFENSECURL,9,AMNESIA,12,LICK,17,BELLYDRUM,20,YAWN,25,CHIPAWAY,28,REST,28,SNORE,33,SLEEPTALK,36,BODYSLAM,41,BLOCK,44,ROLLOUT,49,CRUNCH,52,HEAVYSLAM,57,GIGAIMPACT
    EggMoves=AFTERYOU,CHARM,COUNTER,CURSE,DOUBLEEDGE,FISSURE,LICK,NATURALGIFT,PURSUIT,SELFDESTRUCT,WHIRLWIND,ZENHEADBUTT
    Compatibility=1,1
    StepsToHatch=10455
    Height=2.1
    Weight=460.0
    Color=Black
    Habitat=Mountain
    RegionalNumbers=143,230
    Kind=Sleeping
    Pokedex=Snorlax's typical day consists of nothing more than eating and sleeping. It is such a docile Pokémon that there are children who use its big belly as a place to play.
    WildItemCommon=LEFTOVERS
    WildItemUncommon=LEFTOVERS
    WildItemRare=LEFTOVERS
    BattlerPlayerY=0
    BattlerEnemyY=9
    BattlerAltitude=0
    Evolutions=

    NOTE: The text in green

    Try and edit it according to this layout, see if that works.
    Also, there is a program used to edit the pokemon.txt.

    Here it is:

    https://www.pokecommunity.com/showthread.php?t=295455
     
    8
    Posts
    10
    Years
    • Seen Apr 21, 2015
    Yes i see it, but also in the set pokemon, ones like Bulbasaur for example, run fine and don't even require that field?????
    Thank you very much for the links also. The tool seems a little like extra work in my opinion as you'll be typing it in anyway.
    What I copied was 'from' the original set also. I simply took out the WildItem sections as i dont want those things in and I believe, from what I've read, it's only optional...
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Yes i see it, but also in the set pokemon, ones like Bulbasaur for example, run fine and don't even require that field?????
    Thank you very much for the links also. The tool seems a little like extra work in my opinion as you'll be typing it in anyway.
    What I copied was 'from' the original set also. I simply took out the WildItem sections as i dont want those things in and I believe, from what I've read, it's only optional...

    Okay, I just replaced my first 3 pokemon in the pokemon.txt with your first 3.

    I learned that I needed to delete bulbasaur, ivysaur, and venusaur from the tm.txt, and also delete them from the trainers.txt and anywhere else they might be. If you've pasted over the original 21 pokemon, try finding all of their references and deleting them. And updating the tm.txt for the new pokemon. That got rid of all of the errors I got.

    This is found in the Compiler script section around line 2203:
    Code:
    def pbCompilePokemonData
      sections=[]
      requiredtypes={
         "Name"=>[0,"s"],
         "Kind"=>[0,"s"],
         "InternalName"=>[0,"c"],
         "Pokedex"=>[0,"S"],
         "Type1"=>[8,"e",PBTypes],
         "BaseStats"=>[10,"uuuuuu"],
         "Rareness"=>[16,"u"],
         "GenderRate"=>[18,"e",{"AlwaysMale"=>0,"FemaleOneEighth"=>31,"Female25Percent"=>63,
            "Female50Percent"=>127,"Female75Percent"=>191,"AlwaysFemale"=>254,"Genderless"=>255}],
         "Happiness"=>[19,"u"],
         "GrowthRate"=>[20,"e",["Medium","Erratic","Fluctuating","Parabolic","Fast","Slow"]],
         "StepsToHatch"=>[21,"w"],
         "Color"=>[6,"e",["Red","Blue","Yellow","Green","Black","Brown","Purple","Gray","White","Pink"]],
         "EffortPoints"=>[23,"uuuuuu"],
         "Compatibility"=>[31,"uu"],
         "Height"=>[33,"f"],
         "Weight"=>[35,"f"],
         "BaseEXP"=>[38,"w"],
         "Moves"=>[0,"*uE",nil,PBMoves],
      }
      optionaltypes={
         "BattlerPlayerY"=>[0,"i"],
         "BattlerEnemyY"=>[0,"i"],
         "BattlerAltitude"=>[0,"i"],
         "EggMoves"=>[0,"*E",PBMoves],
         "FormNames"=>[0,"S"],
         "Type2"=>[9,"e",PBTypes],
         "Habitat"=>[7,"e",["Grassland","Forest","WatersEdge","Sea","Cave","Mountain","RoughTerrain","Urban","Rare"]],
         "RegionalNumbers"=>[9,"*u"],
         "Abilities"=>[29,"eg",PBAbilities,PBAbilities],
         "HiddenAbility"=>[37,"e",PBAbilities],
         "Evolutions"=>[0,"*ses",nil,["Unknown",
            "Happiness","HappinessDay","HappinessNight","Level","Trade",
            "TradeItem","Item","AttackGreater","AtkDefEqual","DefenseGreater",
            "Silcoon","Cascoon","Ninjask","Shedinja","Beauty",
            "ItemMale","ItemFemale","DayHoldItem","NightHoldItem","HasMove",
            "HasInParty","LevelMale","LevelFemale","Location","TradeSpecies",
            "Custom1","Custom2","Custom3","Custom4","Custom5","Custom6","Custom7"]],
         "WildItemCommon"=>[48,"*E",PBItems],
         "WildItemUncommon"=>[50,"*E",PBItems],
         "WildItemRare"=>[52,"*E",PBItems]
      }

    Edit this to set specific types upon compilation
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    thor - Honestly, you're not really helping. You're not answering the question, and instead giving advice which doesn't apply to the problem at hand, and talking about things which have already been stated to not be the problem.



    Ryan - I put your Pokémon in a copy of Essentials, and got a message saying that section 13 was wrong (not 12). In that section it says Type2-NORMAL, with a dash where the equals sign should be. That's your problem. The same problem (for Type2) is also in every section after that, so you'll need to correct them all.

    Having fixed those, there's still a problem. Sections 20 and 21 contains the line Color=Orange, but orange isn't one of the colours allowed (unless you've changed the scripts to allow it).

    But then there's still a problem. Section 21 mentions the move TWINNEEDLE, but Twineedle doesn't have two N's in it.

    Once you've fixed all those things, though, problem solved!
     

    thor348

    That's Oak to You
    137
    Posts
    11
    Years
  • Just because you developed Essentials, doesn't mean you can be rude. I was only helping as best as I could.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    I would have said that even if I wasn't the only person developing Essentials. My point was that your comments weren't related to the problem (yes, they were about other problems people could have when changing Pokémon, but not about this one). Information like that might cause confusion and further problems, particularly when you're suggesting that someone should edit (complicated) scripts.

    I'm sorry if I came off as rude.
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Don't worry Thor, we've all tried helping and giving wrong advice in the past :P

    A little advice to anyone who has these problems with PBS files, in future... Don't fully edit something without play testing each minor edit first... It saves problems like these coming out, I've made silly mistakes like this in the past which could've been solves if I just checked my work over... Just a suggestion.
     
    Back
    Top