Lance Koijer 2.0
Lance Koijer
- 105
- Posts
- 7
- Years
- Criscanto Town
- Seen Jan 31, 2024
Hi, everyone!
Can anyone point out to me what is wrong with my script?
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.
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.