The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Help with Gender-Dependent Script (https://www.pokecommunity.com/showthread.php?t=444734)

juanorangetree January 26th, 2021 2:17 AM

Help with Gender-Dependent Script
 
Hey everyone! I'm new to rom-hacking and I just got to work on a FireRed hack and I was looking for some help. I tried inputting a gender-dependent script for an NPC in XSE, but every time I try to compile it I get an Error 13 "Type Mismatch" on line 7 (compare LASTRESULT 0x0). Here's the script:

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
checkgender
compare LASTRESULT 0x0
if 0x1 goto @male
msgbox @talkFemale 0x6
release
end

#org @male
msgbox @talkMale 0x6
release
end

#org @talkFemale
= Why, hello [player]! RED isn't home at\nthe moment.

#org @talkMale
= Why, hello [player]! LEAF isn't home at\nthe moment.


I'm not sure what I'm doing wrong. If anyone can help I would really appreciate it!

Anon822 January 26th, 2021 2:29 AM

Maybe LASTRESULT is not defined in your version of XSE, try replacing it with 0x800D

juanorangetree January 26th, 2021 3:23 AM

That worked!! Thank you so much trying to figure that out was killing me yesterday!


All times are GMT -8. The time now is 9:18 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.