• 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 entering in a Pokémon Center

Diegou18

Forever Chandelure lover.
75
Posts
6
Years
    • Seen Aug 16, 2021
    Hello. I've modified a part of a script item created by me:

    ItemHandlers::UseOnPokemon.add(:TRUECRISTAL,proc{|item,pokemon,scene|
    if isConst?(pokemon.species,PBSpecies,:ROTOM)
    if pokemon.hp>0
    pokemon.form=(pokemon.form==0) ? 6 : 0
    scene.pbRefresh
    scene.pbDisplay(_INTL("{1} changed Form!",pokemon.name))
    next true
    else
    scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
    end
    else
    scene.pbDisplay(_INTL("It had no effect."))
    next false
    end
    })

    I modified this part:

    pokemon.form=(pokemon.form<=5) ? 6 : 0

    I did it because Rotom has 5 forms, and I want that my item works with all forms, no only with the normal form (form 0).

    After that, I tested if my item was working like I wanted, and it was. Then, I went to a Pokémon Center, and when I enter, the event of the door changed its graphics (the door opening) and Essentials gave me an error before that my player appeared in the map of the Pokémon Center:

    ---------------------------
    Pokemon Essentials
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: ArgumentError

    Message: comparison of String with 5 failed

    Game_Event:152:in `<'

    Game_Event:152:in `nf_particles_game_map_refresh'

    Game_Event:139:in `each'

    Game_Event:139:in `nf_particles_game_map_refresh'

    ParticleEngine:596:in `refresh'

    Game_Event:20:in `nf_particles_game_map_initialize'

    ParticleEngine:591:in `initialize'

    Game_Map:57:in `new'

    Game_Map:57:in `setup'

    Game_Map:56:in `each'



    This exception was logged in...


    What is wrong? Did my modification do anything? Thanks for answer.
     

    Diegou18

    Forever Chandelure lover.
    75
    Posts
    6
    Years
    • Seen Aug 16, 2021
    I was trying to find the problem in-game, and it appears when I create an event with a Variable Condition (Variable (the name) is (number) or above), but I don't know how to solve it.
     
    Back
    Top