The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script An error, please 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 27th, 2020 (6:20 PM). Edited April 27th, 2020 by cozzilicious.
cozzilicious cozzilicious is offline
 
Join Date: Apr 2020
Posts: 8
I want to implement a new repel system into this FR hack i'm making and i've got the hex coding for it complete. I just need to do something in XSE and i keep getting an error message

After copy and pasting the code, I hit 'compile" and an error message pops up "Error 13: mismatch/ #define is missing" and it points out that the error was committed on line 6. I'm not sure what to do or what to add since i did everything correctly :(

#dynamic 0x8797A7

#org @main
lock
checkitem 0x800E 0x1
compare LASTRESULT 0x1 <--- line 6
if 0x4 goto @HaveRepel
msgbox @RepelWoreOff 0x3
release
end

#org @HaveRepel
msgbox @UseAgain 0x5
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto @ASM
end

#org @ASM
callasm 0x081BFB69
end

#org @RepelWoreOff
= Repel's effect wore off.

#org @UseAgain
= Repel's effect wore off,\pWould you like to use another?

For some context, watch Repel mod for FireRed on YT, should be the first video
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old April 28th, 2020 (9:28 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
The issue is that that the variable LASTRESULT isn't being parsed correctly into becoming 0x800D. I suspect that you're using an outdated version of XSE so try using this one. Alternatively, you could replace both instances of LASTRESULT in your script into 0x800D.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old April 29th, 2020 (4:57 AM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by cozzilicious View Post
I want to implement a new repel system into this FR hack i'm making and i've got the hex coding for it complete. I just need to do something in XSE and i keep getting an error message

After copy and pasting the code, I hit 'compile" and an error message pops up "Error 13: mismatch/ #define is missing" and it points out that the error was committed on line 6. I'm not sure what to do or what to add since i did everything correctly :(

#dynamic 0x8797A7

#org @main
lock
checkitem 0x800E 0x1
compare LASTRESULT 0x1 <--- line 6
if 0x4 goto @HaveRepel
msgbox @RepelWoreOff 0x3
release
end

#org @HaveRepel
msgbox @UseAgain 0x5
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto @ASM
end

#org @ASM
callasm 0x081BFB69
end

#org @RepelWoreOff
= Repel's effect wore off.

#org @UseAgain
= Repel's effect wore off,\pWould you like to use another?

For some context, watch Repel mod for FireRed on YT, should be the first video
First, like DrFugi said, you should be using XSE v1.1.1. But I believe the error is being caused because it seems that you didn't remove the "<--- line 6" phrase.
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old April 29th, 2020 (6:36 AM).
cozzilicious cozzilicious is offline
 
Join Date: Apr 2020
Posts: 8
Quote:
Originally Posted by PokeChu View Post
First, like DrFugi said, you should be using XSE v1.1.1. But I believe the error is being caused because it seems that you didn't remove the "<--- line 6" phrase.
oh idk why thats there but it is not in the actual script lol
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old April 29th, 2020 (6:37 AM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by cozzilicious View Post
oh idk why thats there but it is not in the actual script lol
Hmm... But when I compiled it (removing the "<--- line 6"), it gave me no errors.
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old April 29th, 2020 (6:44 AM).
cozzilicious cozzilicious is offline
 
Join Date: Apr 2020
Posts: 8
Quote:
Originally Posted by PokeChu View Post
Hmm... But when I compiled it (removing the "<--- line 6"), it gave me no errors.
let me try again, also when I try to respond to DrFuji it gives me an "sorry you cant post any links" yet I'm able to respond to you
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old April 29th, 2020 (6:57 AM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by cozzilicious View Post
let me try again, also when I try to respond to DrFuji it gives me an "sorry you cant post any links" yet I'm able to respond to you
That's because DrFugi's post has used links to certain pages.
New members on the PokéCommunity cannot post links. Try deleting the portion in Quotes Section to reply.
__________________
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old April 29th, 2020 (7:32 AM).
cozzilicious cozzilicious is offline
 
Join Date: Apr 2020
Posts: 8
Quote:
Originally Posted by DrFuji View Post
The issue is that that the variable LASTRESULT isn't being parsed correctly into becoming 0x800D. I suspect that you're using an outdated version of XSE so try using this one[/URL]. Alternatively, you could replace both instances of LASTRESULT in your script into 0x800D.

is there a way to save the script to the rom after clicking compile? I switched LASTRESULT to 0x800D and it compiled! but in-game, the option to use repel again w/o going into ur bag didn't appear :( and I did everything in the YT tutorial as well
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old April 29th, 2020 (7:35 AM).
cozzilicious cozzilicious is offline
 
Join Date: Apr 2020
Posts: 8
Quote:
Originally Posted by PokeChu View Post
That's because DrFugi's post has used links to certain pages.
New members on the PokéCommunity cannot post links. Try deleting the portion in Quotes Section to reply.
thank you, I was finally able to compile it however, in-game (this is for BW2 repel system) the option did not come up ;/
Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old April 29th, 2020 (7:43 AM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by cozzilicious View Post
thank you, I was finally able to compile it however, in-game (this is for BW2 repel system) the option did not come up ;/

Try this:
Code:
#dynamic 0x800000

#org @main
lock
checkitem 0x800E 0x1
compare LASTRESULT 0x1
if 0x4 goto @HaveRepel
msgbox @RepelWoreOff 0x3
release
end

#org @HaveRepel
msgbox @UseAgain 0x5
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto @ASM
end

#org @ASM
callasm 0x081BFB69
end

#org @RepelWoreOff
= Repel's effect wore off.

#org @UseAgain
= Repel's effect wore off,\pWould you like to use another?
But in the end, you can use Hex Helper Double OH! or TL's Quick Enhancer to implant it.
__________________
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old April 29th, 2020 (7:54 AM).
cozzilicious cozzilicious is offline
 
Join Date: Apr 2020
Posts: 8
Quote:
Originally Posted by PokeChu View Post
Try this:
Code:
#dynamic 0x800000

#org @main
lock
checkitem 0x800E 0x1
compare LASTRESULT 0x1
if 0x4 goto @HaveRepel
msgbox @RepelWoreOff 0x3
release
end

#org @HaveRepel
msgbox @UseAgain 0x5
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto @ASM
end

#org @ASM
callasm 0x081BFB69
end

#org @RepelWoreOff
= Repel's effect wore off.

#org @UseAgain
= Repel's effect wore off,\pWould you like to use another?
But in the end, you can use to implant it.
is there a way to save the script to the rom in XSE?
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

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:18 AM.