You are viewing our Forum Archives. To view or take place in current topics click here.
Need help with Code.
Posted:
Need help with Code.Posted:
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Hello, I am making a MW2 Tu8 Tool. And can't seem to figure out what is wrong with this code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using XRPCLib;
using XDevkit;
namespace MW2_XRPC_Tool_TU8
{
public partial class Form1 : Form
{
XRPC Jtag = new XRPC();
public uint SV = 0x82254940;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Jtag.Connect();
if (Jtag.activeConnection)
MessageBox.Show("Connected!");
else
MessageBox.Show("Failed");
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
int client = (int)numericUpDown1.Value;
Jtag.Call(SV, client 1, textBox1.Text);
}
}
}
#2. Posted:
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Explain your problem a little more, are you getting an error?
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
MHU_Lobbies wrote Hello, I am making a MW2 Tu8 Tool. And can't seem to figure out what is wrong with this code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using XRPCLib;
using XDevkit;
namespace MW2_XRPC_Tool_TU8
{
public partial class Form1 : Form
{
XRPC Jtag = new XRPC();
public uint SV = 0x82254940;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Jtag.Connect();
if (Jtag.activeConnection)
MessageBox.Show("Connected!");
else
MessageBox.Show("Failed");
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
int client = (int)numericUpDown1.Value;
Jtag.Call(SV, client 1, textBox1.Text);
}
}
}
You missed a comma between client & 1
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
XeXStozza wrote Explain your problem a little more, are you getting an error?
Error 1 ) expected c:\users\furyt_000\documents\visual studio 2013\Projects\MW2 XRPC Tool TU8\MW2 XRPC Tool TU8\Form1.cs 41 34 MW2 XRPC Tool TU8
Error 2 Invalid expression term ',' c:\users\furyt_000\documents\visual studio 2013\Projects\MW2 XRPC Tool TU8\MW2 XRPC Tool TU8\Form1.cs 41 35 MW2 XRPC Tool TU8
Error 3 ; expected c:\users\furyt_000\documents\visual studio 2013\Projects\MW2 XRPC Tool TU8\MW2 XRPC Tool TU8\Form1.cs 41 35 MW2 XRPC Tool TU8
Error 4 ; expected c:\users\furyt_000\documents\visual studio 2013\Projects\MW2 XRPC Tool TU8\MW2 XRPC Tool TU8\Form1.cs 41 37 MW2 XRPC Tool TU8
Error 5 Invalid expression term ')' c:\users\furyt_000\documents\visual studio 2013\Projects\MW2 XRPC Tool TU8\MW2 XRPC Tool TU8\Form1.cs 41 50 MW2 XRPC Tool TU8
Error 6 ; expected c:\users\furyt_000\documents\visual studio 2013\Projects\MW2 XRPC Tool TU8\MW2 XRPC Tool TU8\Form1.cs 41 50 MW2 XRPC Tool TU8
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
I got this after I added that comma.
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Ok nevermind, it works now, thanks alot!
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Sep 21, 201310Year Member
Posts: 454
Reputation Power: 26
Explain more I don't follow ..
You missed a comma dat all, and why in a textbox coding 0_O
You missed a comma dat all, and why in a textbox coding 0_O
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Also why are you calling it onTextChanged? Just add a button and use it with OnButtonClick
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Status: Offline
Joined: Jun 08, 201211Year Member
Posts: 407
Reputation Power: 18
Also i learn't that using try & catch instead of 'Jtag.activeConnecion' stops the console freezing
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
Status: Offline
Joined: Oct 30, 201112Year Member
Posts: 414
Reputation Power: 17
I'm a beginner, and just started this tool. Don't know anything sorry.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.