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

[Question] Need help fixing my game

36
Posts
4
Years
    • Seen today
    Hi, I have a couple script lines that're corrupt in my game (my laptop froze and crashed while I was saving everything after being in the Sprite positioner), and I would like to know if somebody could help me re-write them the way they're supposed to be?

    For now it's
    Scene_Intro line 78: cry=pbCryFile(1+rand(PBSpecies.maxValue))
    Scene_Intro line 79: pbSEPlay(cry,80,100) if cry
    PokeBattle_Trainer line 197: for i in 0..PBSpecies.maxValue

    When I try to run my game (not in playtest) this happens after showing the splash-art at the main screen. I have no idea how to code, so this is completely confusing to me.
     
    Last edited:
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Those lines don't immediately look wrong. What are the full error messages? I assume that you could fix them by replacing things in the Data folder with clean copies (e.g. from a backup or from an unedited Essentials). Of course replacing the whole folder would more-or-less reset all your progress, but you could try doing one at a time starting with the ones you reckon are corrupted first.
     
    36
    Posts
    4
    Years
    • Seen today
    Script 'Scene_Intro' line 78: Name Error occurred
    uninitialized constant IntroEventScene::PBSpecies

    Script 'Scene_Intro' line 79: Name Error occurred
    undefined local variable or method 'cry' for #<IntroEventScene:0xd90f440>

    Script 'PokeBattle_Trainer' line 197: Name Error occurred
    uninitialized constant PokeBattle_Trainer::PBSpecies

    And now this one as well
    Script 'PokeBattle_Trainer' line 298: Syntax Error occurred
     
    36
    Posts
    4
    Years
    • Seen today
    Okay, I managed to fix the first two, by following the advice on another thread. It works now, and it will play the Pokémon Cry again. But the third one still makes the game crash...
    Will try to do something similar to that one, but could still really need some help
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Perhaps your .dat files in the Data folder got corrupted. Pretty sure if you delete them Essentials will automatically regenerate them.
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Which dat file though?

    All the files ending in .dat should automatically be recreated, so take a backup of that folder (just for safety's sake) and delete them all (all the .dat files, not the .rxdata or whatever else is in that folder).
     
    Last edited:
    36
    Posts
    4
    Years
    • Seen today
    Nope, it doesn't generate new files, it just makes the playtest-version crash as well. Luckily I made backups of the files before deleting them, so that part is easily fixable. Also, I tried to run the game normally after deleting the files, but the "Script 'PokeBattle_Trainer' line 197: Name Error occurred
    uninitialized constant PokeBattle_Trainer::PBSpecies"-error still occurred :/
     
    36
    Posts
    4
    Years
    • Seen today
    Okay, I think it's related to something I did last week, where I made a new Pokédex consisting of 21 of my own Pokémon. I don't know what to do though, should I delete that new Pokédex??
     

    Attachments

    • scripts.PNG
      scripts.PNG
      5.8 KB · Views: 6
    Last edited:
    Back
    Top