The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script needed help for figuring out if

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 11th, 2017 (1:34 AM).
Go! Squirtle's Avatar
Go! Squirtle Go! Squirtle is offline
Squirtle master is here
 
Join Date: Jun 2016
Location: kanto
Age: 20
Gender: Male
Nature: Jolly
Posts: 60
Hello! everyone i needed some help in IF statement. In Diegoisasewsome's tutorial he says that if always have a 0x1 and 0x0 parameters or if is always covered by goto statement. But when i decompile a in game script it have a if with 0x4 parameters after a compare variable statement and it is covered by call not goto. it is in this form :-

Quote:
compare 0x4055 0x2
if 0x4 call @start
My question is that for what 0x4 is used for and why call is used here?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old April 11th, 2017 (10:33 AM). Edited April 11th, 2017 by Uncommon.
Uncommon's Avatar
Uncommon Uncommon is offline
Oozma Kappa
 
Join Date: Jun 2015
Location: Johto
Nature: Careful
Posts: 192
IIRC, 0x0 represents false and any other value represents true. 0x1 is the most obvious (and most readable) but I believe any other value will do the same thing as long as it's not 0x0.

I'm pretty rusty though, so anybody feel free to correct me if I'm remembering this wrong.


Edit: Nope, read NewDenverCity's post below!
__________________
My work: HM type-check system hack (FireRed) | Turbo Test patch (FireRed)

Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old April 11th, 2017 (1:49 PM).
NewDenverCity's Avatar
NewDenverCity NewDenverCity is offline
 
Join Date: Apr 2014
Location: Antarctica
Gender: Male
Nature: Calm
Posts: 326
Uncommon is wrong, sorry

0 is less than, 1 is equal to, 2 is greater than, 3 is less than or equal to, 4 is greater than or equal to, 5 is not equal. Hope this helps!
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old April 14th, 2017 (7:46 AM).
Go! Squirtle's Avatar
Go! Squirtle Go! Squirtle is offline
Squirtle master is here
 
Join Date: Jun 2016
Location: kanto
Age: 20
Gender: Male
Nature: Jolly
Posts: 60
Quote:
Originally Posted by NewDenverCity View Post
Uncommon is wrong, sorry

0 is less than, 1 is equal to, 2 is greater than, 3 is less than or equal to, 4 is greater than or equal to, 5 is not equal. Hope this helps!
Thank you! You are great.
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.