I am getting an exception when I try to call the CreateAccount() method within the NLS class, here is the exception:
System.IO.IOException was unhandled
Message="There is insufficient space in the data buffer for the account creation packet."
Source="MBNCSUtil"
StackTrace:
at MBNCSUtil.NLS.CreateAccount(Stream stream)
at MBNCSUtil.NLS.CreateAccount(Byte[] buffer, Int32 startIndex, Int32 totalLength)
at MBNCSUtil.NLS.CreateAccount(BncsPacket acctPacket)
Here is my code:
AddChat(Color.Yellow, "Attempting to create account...");
BncsPacket x52 = new BncsPacket((byte)Constants.PID.SID_AUTH_ACCOUNTCREATE);
NLS nls = new NLS(Config.Username, Config.Password);
if (nls.CreateAccount(x52) > 0) { < --- problem occurs here
bncs.SendData(x52.GetData());
}
else
{
AddChat(Color.Red, "NLS CreateAccount() call returned no data!");
}
Any thoughts or suggestions?
I am using MBNCSUtil 2.0.3.15
[Edit: deleted long line that was breaking the layout.]
why not just do this?
nls.CreateAccount(x52);
If you read the documentation, it returns the length of the data... Therefore if the CreateAccount() call fails it would send a malformed packet...
Hm, what version of .NET are you using (2.0 or 3.5)? Are you using a Visual Studio 2008 beta?
.NET 2.0, VC# Express 2005
See if you can hit me up on IM. Do you use the source code or just the binary? I'd like to walk you through stepping into the code to see exactly what the issue is.
I am just using the binary actually, I will be on AIM tomorrow around 10am AEST (Australian Eastern Standard Time) which is GMT+10 :P