BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the community, you simply need to register an account or log into an existing one.

Be sure to check out disposable e-mail services, in case you prefer using one for this site instead of your legit address: http://10minutemail.com/10MinuteMail/

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can see and download all content provided for regular members even without an account!

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the community, you simply need to register an account or log into an existing one.

Be sure to check out disposable e-mail services, in case you prefer using one for this site instead of your legit address: http://10minutemail.com/10MinuteMail/

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can see and download all content provided for regular members even without an account!

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Search
 
 

Display results as :
 


Rechercher Advanced Search

February 2023
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728     

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

How Do I Make Else-If and Nested If Statements in Gecko?

2 posters

Go down  Message [Page 1 of 1]

Reclaimer Shawn

Reclaimer Shawn
Code Creator

I know Gecko Codetype 20 is a 32-bit if comparison and I know 28 is a 16-bit if comparison.

Let's say I wanted to have two if statements met before exeucting a code, and otherwise, execute other code. Here's what I'm wanting to do in pseudocode:

Let X, Y, and Z be memory adresses.

Code:

If X = 0x49 and Y = 0x49 then
 Z = 0x1A1
else
 Z = 0xF9
end

Another way to represent this would be:

Code:

If X = 0x49 then
 If Y = 0x49 then
  Z = 0x1A1
 else
  Z = 0xF9
 end
else
 Z = 0xF9
end

How do I represent that in Gecko Code? I have done this properly with a C0 code that works 100% of the time, but I might be able to shorten the code if done in Gecko instead of ASM.

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Pretty good question, exactly what crossed my mind before with those "simple" codetypes, so I think you can't do that...
This is rare enough that you would need to resort to ASM.
The codetypes are not a "full" programming language but they cover most use cases. Wink


_________________
How Do I Make Else-If and Nested If Statements in Gecko? YBjg74I

Reclaimer Shawn

Reclaimer Shawn
Code Creator

Bully@WiiPlaza wrote:Pretty good question, exactly what crossed my mind before with those "simple" codetypes, so I think you can't do that...
This is rare enough that you would need to resort to ASM.
The codetypes are not a "full" programming language but they cover most use cases. Wink

Honestly, if the game doesn't freeze from it, it seems that using the C0 Codetype is actually preferably than using the other Gecko Codetypes in most cases. ASM is a lot more versatile. Guess I'll just leave the basic comparisons and basic operations to Gecko codetypes and then let the rest be in ASM. Thanks for telling me it wasn't possible.

I was wanting to do a nested If-statement for a Pokemon XD code, but I already did it with a C0 codetype and released it on the forum. It's as the C0 Codetype bugfix in my Shadow Pokemon code.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum