• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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] self-fulfilling IF conditions?

  • 6
    Posts
    6
    Years
    • Seen Sep 12, 2020
    I'm using 16.x (I don't know if 17.x has an elite battle system equivalent, if it does please tell me so I can switch)
    I do not know why or how, but some IF lines in my essentials are making the conditions true before checking said contidions. and it even modifies pokemon.PBS when I run the game.

    for example:
    if pokemon.ballused = 26
    makes the pokemon's ballused value 26 and then checks if the value is 26.

    and also
    if opponent.hasWorkingAbility(:STURDY)
    replaces the pokemon in question's ability for sturdy before checking, modifying the pokemon.PBS

    this wrecked my PBS file and I had to remake it, please halp u.u
     
    One = means "set the variable on the left to the value of what's on the right". Two == is what you use to compare two values.

    Your examples really shouldn't have altered anything in the PBS files. How were you using this code to make that happen?
     
    Last edited:
    oh... I'm more of a noob than I thought XD thanks!
    and my PBS tends to replace abilities for sturdy and some others, testing does have the ability to alter the PBS. it even turns off "read only" on the PBS files and displays a warning message.
     
    Back
    Top