- 5
- Posts
- 5
- 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:
This is what it generates in-game:
![[PokeCommunity.com] Yes/No Script doesn't work properly [PokeCommunity.com] Yes/No Script doesn't work properly](https://data.pokecommunity.com/attachments/13/13870-3b1ae313219148481d93c7e318f04fff.jpg)
And this is how the code appears after checking it in AdvanceMap 1.92 again:
Thank you to anyone willing to help :/
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:
Code:
'-----------------------
#org 0x80135F
lock
faceplayer
msgbox 0x8801384 '"Hello! Are you having fun?"
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x880137B
msgbox 0xF8013AF
'-----------------------
#org 0x80137B
msgbox 0x88013A0 '"Nice! Me too."
'---------
' Strings
'---------
#org 0x801384
= Hello! Are you having fun?
#org 0x8013A0
= Nice! Me too.
#org 0xF8013AF
= Oh, I'm sorry.
This is what it generates in-game:
![[PokeCommunity.com] Yes/No Script doesn't work properly [PokeCommunity.com] Yes/No Script doesn't work properly](https://data.pokecommunity.com/attachments/13/13870-3b1ae313219148481d93c7e318f04fff.jpg)
And this is how the code appears after checking it in AdvanceMap 1.92 again:
Spoiler:
Code:
'-----------------------
#org 0x80135F
lock
faceplayer
msgbox 0x8801384 '"Hello! Are you having fun?"
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x880137B
msgbox 0xF8013AF
[B]callstd 0xF
nop
checkgender
setfarbyte 0x80 0x6C020908
updatecoins 0xD9 0xE0[/B]
'-----------------------
#org 0x80137B
msgbox 0x88013A0 '"Nice! Me too."
'---------
' Strings
'---------
#org 0x801384
= Hello! Are you having fun?
#org 0x8013A0
= Nice! Me too.
Thank you to anyone willing to help :/