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

Game Corner prize-giving event crashing the game

PunkPhantom

"midna's a cat" -vinny, vinesauce
78
Posts
10
Years
    • Age 29
    • Seen Nov 20, 2016
    So I have a standard event of the person who gives you various Pokemon as prizes at the Game Corner, but I changed the original event to give different Pokemon. It all works fine except if you press x to back out of the dialogue instead of selecting "No thanks", the game crashes. It obviously has to do with the formatting of the script in the event but I can't seem to get it to work right since I have an odd number of Pokemon to choose from instead of an even number.

    Game Corner prize-giving event crashing the game

    Game Corner prize-giving event crashing the game


    And here is the error
    Code:
    Exception: RuntimeError
    Message: Script error within event 34, map 3 (Rocket Casino):
    Exception: TypeError
    Message: Section041:559:in `[]'no implicit conversion from nil to integer
    ***Full script:
    item=[:KOFFING,:SANDILE,
          :DITTO,:PORYGON,0][pbGet(1)]
    price=[180,500,2800,5500,
           0][pbGet(1)]
    lv=[20,20,20,20,0][pbGet(1)]
    if item && item!=0
      item=getID(PBSpecies,item)
    end
    pbSet(1,item); pbSet(2,price)
    pbSet(3,PBSpecies.getName(item))
    pbSet(4,lv)
    
    Interpreter:243:in `pbExecuteScript'
    Intl_Messages:559:in `get'
    Intl_Messages:670:in `get'
    Intl_Messages:707:in `pbGetMessage'
    PBSpecies:652:in `getName'
    (eval):10:in `pbExecuteScript'
    Interpreter:1606:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:1606:in `command_355'
    Interpreter:494:in `execute_command'
    
    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'
     

    PunkPhantom

    "midna's a cat" -vinny, vinesauce
    78
    Posts
    10
    Years
    • Age 29
    • Seen Nov 20, 2016
    Actually never mind, i figured out the problem, but i can't seem to delete the thread...
     
    Back
    Top