The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Script XSE #define error help.

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old April 7th, 2017 (11:53 AM).
ASDBUDDY's Avatar
ASDBUDDY ASDBUDDY is offline
The Derp
 
Join Date: Apr 2017
Location: aint gonna tell ya
Age: 22
Gender: Male
Nature: Docile
Posts: 347
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.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old April 7th, 2017 (2:58 PM).
SkyVortex's Avatar
SkyVortex SkyVortex is offline
 
Join Date: Jan 2017
Location: Ice Path
Gender: Male
Nature: Mild
Posts: 228
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.
__________________

My Twitch.TV Channel
My YouTube Channel
My AdventureQuest/BattleOn character (best viewed with a Flash Player extension enabled)
My OldSchool RuneScape character (if I'm online in-game, feel free to send me a message)

My Tutorials:
Stabilizing Pokemon Emerald (Preventing Corruption)
[Emerald] Controlling Trainer Battle Music... Without ASM
How to Fix the 64K Save 'White-Screen' in VBA Without Save-States

My ROM Hack:
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old April 8th, 2017 (12:21 AM).
ASDBUDDY's Avatar
ASDBUDDY ASDBUDDY is offline
The Derp
 
Join Date: Apr 2017
Location: aint gonna tell ya
Age: 22
Gender: Male
Nature: Docile
Posts: 347
Oh ok, i will try that,Thank you though! :)
EDIT: OMG IT WORKED THANKS MAN!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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