WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Mal1t1a on January 24, 2010, 05:36:10 PM

Title: If Then Else Elseif Endif End. Codes.
Post by: Mal1t1a on January 24, 2010, 05:36:10 PM
I'm trying to do is this (This is VB.Net Code):

If Address = 00000001 Then
Address = 00000002
Else
Address = 00000001
End If


If the Address = 1 then set the address to 2, if it doesn't = 1 then set the address to 1. Close the End statement to prevent any further execution of code.
I want this to be button activated as well, I have the Controller Address. Here's my attempt:

20A47884 08000000 <- Gamecube Y button, It's odd that it goes XXXX0000 instead of 0000XXXX || If the button is pressed do the code below
201A0E13 00000001 <- If the Value is equal to 1, do the code below
051A0E13 00000002 <- Set this address to 2
051F87D3 00000002 <- Set this address to 2
201A0E11 00000002 <- EndIf (End. If) (odd terminology?) The value is equal to 2, then do the code below
051A0E13 00000001 <- Set this address to 1
051F87D3 00000001 <- Set this address to 1
E0000000 80008000 <- Closes the whole If statement (right? Or does it only close the last one? I was just guessing that it closed the If Button Pressed)


Thanks for any/all help.
Title: Re: If Then Else Elseif Endif End. Codes.
Post by: Romaap on January 24, 2010, 06:09:16 PM
I think the button activator is wrong, you should use 28______ ZZZZYYYY.
And why are the last numbers of the addresses 3?
You are writing 32-bits so the last number should be 0, 4, 8 or C
Title: Re: If Then Else Elseif Endif End. Codes.
Post by: Mal1t1a on January 24, 2010, 06:19:54 PM
Actually, it's a 16bit, but writing to it like that works if I took out the if statements, and just put it as only a button activator. I sort of need to learn how they work. If someone could provide me a sample code of what I'm trying to achieve, That'd be great! I'm still learning too.

Anyone?