You are viewing our Forum Archives. To view or take place in current topics click here.
#31. Posted:
XeXStozza
  • Powerhouse
Status: Offline
Joined: Jun 08, 201212Year Member
Posts: 407
Reputation Power: 18
Status: Offline
Joined: Jun 08, 201212Year Member
Posts: 407
Reputation Power: 18
Bitwise wrote
XeXStozza wrote May i ask why your using the catch system like that?

The way i personally do it (People may do it different but this way works for me)

string connected = "XRPC Tool Connected!";
try
{
Jtag.Connect();
}
catch
{
MessageBox.Show("Failed to connect");
}
if(Jtag.activeConnection)
{
MessageBox.Show("Connected");
Jtag.Notify(XRPC.xNotiy.FLASHING_HAPPY_FACE, connected);
}


I use the try and if statements because the if deals with stuff when it connects whereas catch deals with the exception(if there is one).

Also i just wrote that out so if there are mistakes i apologize


May I ask why you didnt use the conditional operation? Just saves afew lines with if & else statements.


try { Jtag.Connect }
catch(Exception e) { MessageBox.Show(e.Message); }
MessageBox.Show((Jtag.activeConnection) ? "Connected" : "Not Connected");


Haha like i said its just the way i do it, does the same thing just a few extra lines
#32. Posted:
XboxInferno
  • Junior Member
Status: Offline
Joined: Mar 17, 201410Year Member
Posts: 95
Reputation Power: 3
Status: Offline
Joined: Mar 17, 201410Year Member
Posts: 95
Reputation Power: 3
XeXStozza wrote you should also put the unlimited ammo function in a try & catch to stop an exception if the tool isn't connected...

try
{
Jtag.SetMemory(0x820F63E0, new byte[] { 0x60, 00, 00, 00 });
      Jtag.Call(0x822C9278, -1, 0, "c ^7UnlimitedAmmo ^3{ON}");
}
catch
{
MesssageBox.Show("Not Connected to console!");
}


Note: I also agree with Rubbers, its an okay tut but we get enough people releasing really horrible tools as it is


It's a tutorial for starters. I'm not trying to make the code that hard to understand.

Also, the tutorial isn't made for people to release tools right after their first code. I'll add some info about that at the bottom.

Thanks for your feedback
#33. Posted:
Bitwise
  • Resident Elite
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
Status: Offline
Joined: Feb 09, 201410Year Member
Posts: 267
Reputation Power: 14
XeXStozza wrote
Bitwise wrote
XeXStozza wrote May i ask why your using the catch system like that?

The way i personally do it (People may do it different but this way works for me)

string connected = "XRPC Tool Connected!";
try
{
Jtag.Connect();
}
catch
{
MessageBox.Show("Failed to connect");
}
if(Jtag.activeConnection)
{
MessageBox.Show("Connected");
Jtag.Notify(XRPC.xNotiy.FLASHING_HAPPY_FACE, connected);
}


I use the try and if statements because the if deals with stuff when it connects whereas catch deals with the exception(if there is one).

Also i just wrote that out so if there are mistakes i apologize


May I ask why you didnt use the conditional operation? Just saves afew lines with if & else statements.


try { Jtag.Connect }
catch(Exception e) { MessageBox.Show(e.Message); }
MessageBox.Show((Jtag.activeConnection) ? "Connected" : "Not Connected");


Haha like i said its just the way i do it, does the same thing just a few extra lines


Yeah, true. But conditional op can be so useful is some scenario's, like for example;
doHeart
Flashing text
Remember that ambitions guy? His doHeart consisted of about roughly 70 lines. I shortened it down to about 7.
#34. Posted:
XboxInferno
  • Junior Member
Status: Offline
Joined: Mar 17, 201410Year Member
Posts: 95
Reputation Power: 3
Status: Offline
Joined: Mar 17, 201410Year Member
Posts: 95
Reputation Power: 3
rubbersallday wrote More like increase spam on forum when more small tools come out with the same features.

Nice Tut though.


I added a little note at the top of the thread for new developers. Should help a little to decrease the amount of small tools.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.