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:

MHUTricK
  • Powerhouse
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:
XeXStozza
  • Powerhouse
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?
#3. Posted:
XeXStozza
  • Powerhouse
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
#4. Posted:
MHUTricK
  • Powerhouse
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
#5. Posted:
MHUTricK
  • Powerhouse
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.
#6. Posted:
MHUTricK
  • Powerhouse
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!
#7. Posted:
IDA
  • Powerhouse
Status: Offline
Joined: Sep 21, 201310Year Member
Posts: 454
Reputation Power: 26
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
#8. Posted:
XeXStozza
  • Powerhouse
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
#9. Posted:
XeXStozza
  • Powerhouse
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
#10. Posted:
MHUTricK
  • Powerhouse
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.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.