• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Selene, Mint, Solana - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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
  • 77
    Posts
    11
    Years
    • Age 30
    • 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.

    [PokeCommunity.com] Game Corner prize-giving event crashing the game

    [PokeCommunity.com] 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'
     
    Actually never mind, i figured out the problem, but i can't seem to delete the thread...
     
    Back
    Top