Post: Clan Tag Problem/error coding in C#
10-05-2015, 12:40 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
I've said multiple times I'm new to C# and I'm getting used to it and I have a problem so I've imported this code from Adrians OPEN SOURCE tool and I seem to get an error here.
You must login or register to view this content.

Possibly cause I'm using MetroTextbox?

The Code I found:
    
private void SetClan(uint offset, string input)
{
PS3.SetMemory(offset, new byte[6]);
if (input.Length == 1)
{
this.CombSetClan = this.Combine(new byte[7], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 2)
{
this.CombSetClan = this.Combine(new byte[6], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 3)
{
this.CombSetClan = this.Combine(new byte[5], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 4)
{
this.CombSetClan = this.Combine(new byte[4], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
if (input.Length > 0)
{
PS3.SetMemory(offset, BitConverter.GetBytes((ulong)(BitConverter.ToUInt64(this.CombSetClan, 0) * ((ulong)0x40L))));
}
}

private byte[] Combine(byte[] Arr1, byte[] Arr2)
{
byte[] array = new byte[Arr1.Length + Arr2.Length];
Buffer.BlockCopy(Arr1, 0, array, 0, Arr1.Length);
Buffer.BlockCopy(Arr2, 0, array, Arr1.Length, Arr2.Length);
return array;
}

private void metroButton15_Click(object sender, EventArgs e)
{
SetClan(0x2708238, metroTextBox3.Text);
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-05-2015, 04:56 AM #11
Originally posted by Adrian View Post
Oh so you are using my open source non host end game?

Put this above your button:
    private void SetClan(uint offset, string input)
{
PS3.SetMemory(offset, new byte[6]);
if (input.Length == 1)
{
CombSetClan = Combine(new byte[7], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else
{
if (input.Length == 2)
{
CombSetClan = Combine(new byte[6], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else
{
if (input.Length == 3)
{
CombSetClan = Combine(new byte[5], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else
{
if (input.Length == 4)
{
CombSetClan = Combine(new byte[4], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
}
}
}
if (input.Length > 0)
{
PS3.SetMemory(offset, BitConverter.GetBytes(BitConverter.ToUInt64(CombSetClan, 0) * 64uL));
}
}
private byte[] Combine(byte[] Arr1, byte[] Arr2)
{
byte[] array = new byte[Arr1.Length + Arr2.Length];
Buffer.BlockCopy(Arr1, 0, array, 0, Arr1.Length);
Buffer.BlockCopy(Arr2, 0, array, Arr1.Length, Arr2.Length);
return array;
}


then something in a button would look like so:
    SetClan(0x2708238, textBox1.Text);//remember to change to your textBox


you will also need this in your application with the new API stuff
    private byte[] CombSetClan;


Done everything right and still seem to get the error?
You must login or register to view this content.
10-05-2015, 03:47 PM #12
Adrian
Adrian is back!
Originally posted by Elitexboxer View Post
Done everything right and still seem to get the error?
You must login or register to view this content.


This happens when you are coding in a decompiled form.
10-05-2015, 06:04 PM #13
B777x
Hurah!
Originally posted by Elitexboxer View Post
I've said multiple times I'm new to C# and I'm getting used to it and I have a problem so I've imported this code from Adrians OPEN SOURCE tool and I seem to get an error here.
You must login or register to view this content.

Possibly cause I'm using MetroTextbox?

The Code I found:
    
private void SetClan(uint offset, string input)
{
PS3.SetMemory(offset, new byte[6]);
if (input.Length == 1)
{
this.CombSetClan = this.Combine(new byte[7], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 2)
{
this.CombSetClan = this.Combine(new byte[6], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 3)
{
this.CombSetClan = this.Combine(new byte[5], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
else if (input.Length == 4)
{
this.CombSetClan = this.Combine(new byte[4], Encoding.ASCII.GetBytes(input).Reverse<byte>().ToArray<byte>()).Reverse<byte>().ToArray<byte>();
}
if (input.Length > 0)
{
PS3.SetMemory(offset, BitConverter.GetBytes((ulong)(BitConverter.ToUInt64(this.CombSetClan, 0) * ((ulong)0x40L))));
}
}

private byte[] Combine(byte[] Arr1, byte[] Arr2)
{
byte[] array = new byte[Arr1.Length + Arr2.Length];
Buffer.BlockCopy(Arr1, 0, array, 0, Arr1.Length);
Buffer.BlockCopy(Arr2, 0, array, Arr1.Length, Arr2.Length);
return array;
}

private void metroButton15_Click(object sender, EventArgs e)
{
SetClan(0x2708238, metroTextBox3.Text);
}


can you give a more explained error?
just hover over the error line and you will see a popup with the error explanation

try to remove the "<byte>" from the code
and put this in the first line of your file "using System.Linq"
10-05-2015, 08:58 PM #14
Originally posted by B777x View Post
can you give a more explained error?
just hover over the error line and you will see a popup with the error explanation

try to remove the "<byte>" from the code
and put this in the first line of your file "using System.Linq"


Didn't have to remove <byte> just had to add using System.Linq; Thank you!
10-06-2015, 04:42 AM #15
Adrian
Adrian is back!
Originally posted by Elitexboxer View Post
Didn't have to remove <byte> just had to add using System.Linq; Thank you!


Good to see that you have gotten the issue sorted. If you have any other questions feel free to make another thread.

-Thread Closed.

The following user thanked Adrian for this useful post:

Elitexboxer

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo