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

[Other] givepokemon script error

Kenna18155

Kenna18155
61
Posts
10
Years
    • Age 23
    • Seen Dec 1, 2020
    So I decided to practice the givepokemon script. I wrote the script, debugged, compiled, and assigned it to a person in A-Map. When I booted up VBA and loaded my ROM, i talked to the person and the person disappeared as it said, "MAKENNA recieved a ????????! Too bad!" I took one step away and the person reappeared. When i talk to him again, he disappears, and I supposedly receive a Master Ball, followed by "too bad!" Take a step away, he reappears, I talk to him, he's gone again, i get a Great Ball (too bad!). This continues with me receiving infinite nonexistant Great Balls.

    Here is the script i used:
    Spoiler:
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Considering none of that is in your script, maybe it's a compiling error? Did you edit the script at all after it was first compiled to the ROM?
     

    Logan

    [img]http://pldh.net/media/pokecons_action/403.gif
    10,417
    Posts
    15
    Years
  • Code:
    #org @start
    checkflag 0x800
    if 0x1 goto @done
    compare LASTRESULT 0x1
    msgbox @ask 0x1
    if 0x1 goto @take
    msgbox @notake 0x6
    release
    end
    I'm very concerned with this part of your script. If you're trying to ask a YESNO question surely it should look more like this:

    Code:
    #org @start
    checkflag 0x800
    if 0x1 goto @done
    msgbox @ask MSG_YESNO
    compare 0x800D 0x1
    if 0x1 goto @take
    msgbox @notake MSG_NORMAL
    release
    end
     

    Kenna18155

    Kenna18155
    61
    Posts
    10
    Years
    • Age 23
    • Seen Dec 1, 2020
    I think I figured it out. On my @ask message box, I used 0x1 instead of 0x5.

    I'll check it out tonight or tomorrow and see if that works.
     
    Back
    Top