The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Compare Vars

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 June 6th, 2020 (9:07 AM).
Lance Koijer 2.0 Lance Koijer 2.0 is offline
Lance Koijer
 
Join Date: Apr 2018
Location: Criscanto Town
Gender: Male
Nature: Adamant
Posts: 104
Hi, everyone!
Can anyone point out to me what is wrong with my script?

Code:
#org 0x806A4D
lock
countpokemon
setvar 0x8004 0x0
copyvar 0x8006 LASTRESULT
goto 0x880A0DC

'---------------
#org 0x80A0DC
comparevars 0x8004 0x8006
if 0x2 goto 0x80A107  //checks if the number of Pokemon the player has in his party is GREATER THAN the current Pokemon slot
setvar 0x8003 0x0
special2 LASTRESULT 0x9 //checks ribbon of the Pokemon in slot set in var 0x8004. I'm using CFRU.
compare LASTRESULT 0x14
if 0x1 goto 0x880EE40 //if that Pokemon has ribbon number 20 goto 0x80EE40
addvar 0x8004 0x1 //jumps to the next pokemon
goto 0x880A0DC

'---------------
#org 0x80A107
releaseall
end

'---------------
#org 0x80EE40
....
Basically, all I want to achieve there is checking the entire party if one of them has ribbon 20 (0x14) by doing a countpokemon. However, it goes immediately to 0x80A107 even though one of them has that ribbon.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old July 20th, 2020 (8:56 AM).
Joseph 91's Avatar
Joseph 91 Joseph 91 is offline
 
Join Date: Jun 2017
Location: Domnican Republic
Gender: Male
Posts: 23
What is the error you have when using it?
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:15 AM.