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

Undefined method "Kernel.pbMessageFreeTex" error

  • 5
    Posts
    10
    Years
    • Seen Jul 6, 2016
    So im trying to have a machine ask the trainer a question, and then decide if it is right or wrong. I plan on using this:
    message=Kernel.pbMessageFreeTex
    (_INTL("Please enter a message."),
    _INTL("Default message."),
    false,256,Graphics.width)

    but it does not work. i get this


    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 1, map 105 (gym):

    Exception: NoMethodError

    Message: (eval):1:in `pbExecuteScript'undefined method `pbMessageFreeTex' for Kernel:Module

    ***Full script:

    message=Kernel.pbMessageFreeTex(
    _INTL("Please enter a message."),

    _INTL("Default message."),

    false,256,Graphics.width)


    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `eval'

    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:103:in `update'

    Scene_Map:101:in `loop'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:103:in `update'

    Scene_Map:101:in `loop'

    Scene_Map:114:in `update'

    Scene_Map:68:in `main'



    and then im not sure how to compare it to the answer. I have a pretty good handle on Java, but i know little to nothing about scripting.

    I plan on using a conditional statement in the event for the course of action for a right or wrong answer, and can use a switch that is on if it is right, and off if it is wrong, unless there is a way to have the above script and the comparison happen in the conditional branch.
     
  • 1,224
    Posts
    10
    Years
    Two problems:
    1. I'm sure you mean Kernel.pbMessageFreeText
    2. Spacing is important. Use ExtendText.exe so you don't have to break apart lines. But, if you do, you should break the lines up at the commas, so the interpreter knows to expect the next line

    Code:
    message=Kernel.pbMessageFreeText(_INTL("Please enter a message."), 
    _INTL("Default message."), 
    false,256,Graphics.width)
     
    Back
    Top