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

[Scripting Question] cant delete/toss or consume items [17.2]

  • 465
    Posts
    8
    Years
    • Seen Jun 17, 2024
    I'm not really sure whats happening, the entire process of deleting an item, if deleted by code, tossed or consumed doesn't work. this is referring to $PokemonBag.pbDeleteItem.

    I've made sure all 3 def pbDeleteItem are matching the base v17.2 ones (so two def pbDeleteItem and one def self.pbDeleteItem) no error no message it acts as if it worked but it didn't. what else can affect this to not work? not sure here (i've tested both tossing and deleting by scripts and it wont go, thought it was because it was a key item but no i tested on others.) it seems to just be key-items or items without the "x99" etc. is this just an expected thing if so how can i delete a key-item/important item
     
    I'm not really sure whats happening, the entire process of deleting an item, if deleted by code, tossed or consumed doesn't work. this is referring to $PokemonBag.pbDeleteItem.

    I've made sure all 3 def pbDeleteItem are matching the base v17.2 ones (so two def pbDeleteItem and one def self.pbDeleteItem) no error no message it acts as if it worked but it didn't. what else can affect this to not work? not sure here (i've tested both tossing and deleting by scripts and it wont go, thought it was because it was a key item but no i tested on others.) it seems to just be key-items or items without the "x99" etc. is this just an expected thing if so how can i delete a key-item/important item

    Doing $PokemonBag.pbDeleteItem(:OLDROD) deletes the Old Rod from my bag. If you have more than one of a particular key item and you want to remove all of them, you can do:
    count = $PokemonBag.pbQuantity(:OLDROD)
    $PokemonBag.pbDeleteItem(:OLDROD, count)

    Does this help?
     
    Back
    Top