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 Script XSE #define error help. (https://www.pokecommunity.com/showthread.php?t=391019)

ASDBUDDY April 7th, 2017 11:53 AM

Script XSE #define error help.
 
Hello! This is my first time on pokecommunity so idk how this works, but i just started trying my hand out in ROM hacking and during the making of an NPC script, XSE kept saying Missing #define on a specific line when i tried to compile it! I couldn't find a way to fix it so can anyone help? It keeps saying type mismatch line 8 missing #define.
SCRIPT CODE
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
msgbox @itm1 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
release
end

#org @itm1
= [grey_fr] Its my grandson's birthday!\nand I dont have gift to give him.\lCan you give me a potion for free?

#org @itm2
msgbox @itm2 0x6
= [blue_fr] *SOB*

#org @yes
checkitem 0xD 0x1
compare LASTRESULT 0x1
if 0x4 goto @give

#org @give
removeitem 0xD 0x1
goto @pkmn


#org @pkmn
msgbox @tl 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
setflag 0x200
release
end

#org @tl
= [grey_fr] Thank you kid!\nThis is for you.

#org @done
msgbox @tl2 0x6
release
end

#org @tl2
= [grey_fr] Thank you kid!\nTake good care of Eevee.

SkyVortex April 7th, 2017 2:58 PM

Assuming the line with "LASTRESULT" is line 8, as it appears to be, you are probably missing the "std.rbh" file that contains the definition for the variable LASTRESULT, which is supposed to be 0x800D. You will either need the file in the same folder or change all instances of LASTRESULT to 0x800D.

ASDBUDDY April 8th, 2017 12:21 AM

Oh ok, i will try that,Thank you though! :)
EDIT: OMG IT WORKED THANKS MAN!


All times are GMT -8. The time now is 9:14 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.