• 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 opening the pause menu

10
Posts
8
Years
    • Seen Dec 28, 2018
    So I have the latest Essentials. 16.1. I was looking at this guide for scripting and getting associated with the program. Beginner's Guide

    So I think i messed up on where i put the script. Cause, first script i did was,

    class Say_Something

    def initialize
    print "I am therefore I'm coded"
    end

    end

    Followed it exactly. But i think i put the script in the wrong section. I opened the script editor, first made its own thing above "Main" with a new "====" divider, the script worked, it worked throughout the whole time and still would. But it was having an issue like the one im having now.

    So i looked through the script sections, put it at the bottom of the SystemUtilities hoping this was correct. Script still worked. But then the same issue.

    So i said ok, im gonna remove it and read more of what i can. And now im getting this Error to deal with something i have not touched at all. and wasnt an issue till i removed any trace of the script and events i added before there was any issue.

    Ill attach a screenshot of the error.

    So before i worked on a new intro i saved a game in the essentials part of the game. No issue. at all. Only when i start a new game. and Press the Esc key to view the pause menu. Then this happens.

    2yaSnqm.png
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Have you run pbTrainerName at the start of your game like you're supposed to?
     
    10
    Posts
    8
    Years
    • Seen Dec 28, 2018
    Have you run pbTrainerName at the start of your game like you're supposed to?


    If i recall correctly, no.

    Because, i moved the spot to where it has you pick the name, after the cutscene, and you can walk around and find someone that speaks to you. and gives you a basic run down lol

    So i should definitely move this back? Im going to double check where i have that now.

    I have an intro cutscene, then you pick a gender, and transferred to another map, then on the map you run into an npc whom asks youre name after that.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Given your problem is caused by letting the player open the pause menu before running pbTrainerName...

    Remember that the pause menu contains a link to the trainer card, and the name of that link is the name of the trainer. You can either remove that link at the start of your game, or come up with an alternative (like disabling the pause menu until you've been named).
     
    824
    Posts
    8
    Years
  • If you decide to remove the option for your trainer card, you could easily make it so that you need to sign up for the trainer card, and use that as your in-universe reason to provide your name.

    To pull this off, go to the script section PScreen_PauseMenu, and around line 158 you should find this line of code. Add the red stuff at the end.
    Code:
        commands[cmdTrainer=commands.length]=$Trainer.name [COLOR="Red"]if $Trainer != nil && $Trainer.name != nil[/COLOR]
     
    10
    Posts
    8
    Years
    • Seen Dec 28, 2018
    Youve both been very helpful, i appreciate your responses. Im very new at this LOL and ill put that back and see if thatll fix it right now and get back to you.

    If it does id like to bother you guys for any direction where i can find some info on either one of those options? :)

    That fixed it!! :) Thank you so much!

    Any tips for a newbie?
     
    Last edited by a moderator:
    824
    Posts
    8
    Years
  • Any tips for a newbie?

    Skim through the existing code. Look at how certain features are coded. Usually that'll help you either figure out how to code planned features (as was the case with me and Delta Pokemon) or come up with new ideas entirely (as was the case with me and Multitype moves after seeing how the Gen VI Pack for v15.1 pulled off Flying Press)
     
    10
    Posts
    8
    Years
    • Seen Dec 28, 2018
    appreciate it :), cause i wanna redesign lik the menu and stuff, maybe add a second style of pokes aside from shiny. LOL
     
    12
    Posts
    6
    Years
    • Seen Mar 28, 2022
    If you decide to remove the option for your trainer card, you could easily make it so that you need to sign up for the trainer card, and use that as your in-universe reason to provide your name.

    To pull this off, go to the script section PScreen_PauseMenu, and around line 158 you should find this line of code. Add the red stuff at the end.
    Code:
        commands[cmdTrainer=commands.length]=$Trainer.name [COLOR="Red"]if $Trainer != nil && $Trainer.name != nil[/COLOR]

    I would like to do this also or disable pause menu all together until name has been assigned, but I am getting the same error message even with this code added. Do you have any suggestions please? I am using essentials v17

    Thanks in advance.

    Kieran
     
    Back
    Top