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

[Script] Yes/No Script doesn't work properly

5
Posts
4
Years
    • Seen May 24, 2021
    Hi. I'm very new to rom hacking and I've just started to learn how to script (XSE; FireRed].
    I've been stuck on the compare, if and 0x5 commands for a couple days ... I think I've finally begun to understand better how they work today and I almost got it to work smoothly in my testing, but I still can't get the "No" option right and it's driving me crazy. I don't really seem to understand what's going on. Basically, when I select "No", the message doesn't change and a coin counting appears below. I don't understand why it's happening and how to avoid that. When I check the script again via AdvanceMap after the testing, the "No" msgbox vanished and it got replaced by several other commands.

    Here's the code from XSE (opened in AdvanceMap) before testing:

    Spoiler:

    This is what it generates in-game:

    Yes/No Script doesn't work properly

    And this is how the code appears after checking it in AdvanceMap 1.92 again:

    Spoiler:


    Thank you to anyone willing to help :/
     
    392
    Posts
    3
    Years
    • Seen Nov 24, 2023
    First, you need 0x5 after the msg yes/no or MSG_YESNO
    Second, for regular msgs, you need a 0x6 or a 0x2
    Lastly, you need a release when you have a lock, and an 'end'

    Here are the message types
    Spoiler:


    Here might be your script's structure
    Spoiler:

    https://www.mediafire.com/file/2d4lx9pz39izje0/help_JgmaVQRZ_uWXF.avi/file
     
    Last edited:

    Asith

    Uwao
    237
    Posts
    3
    Years
    • Seen May 8, 2024
    To add on to what the previous user said, this "call std" msgbox format is something that I'm fairly sure is an old format (it predates me getting into rom hacking anyway) and I'm not even sure if XSE still supports it. If your msgboxes work fine, then great - ignore this bit! If not, you should consider using:
    msgbox @textpointer 0x5
    Simply enough, we've moved the "callstd" number to the end of the msgbox line. Nothing else changes, you just don't need to callstd seperately.

    As for your real problem - you script being overwritten by different commands - that's likely a memory issue. You've run out of free space and the game is using script data from some other script. Try using a fresh rom or a different offset, making sure to search for a decent amount of free space!
     
    Last edited:
    Back
    Top