Valhalla Legends Forums Archive | Battle.net Bot Development | [MBNCSUtil] NLS.CreateAccount()

AuthorMessageTime
DDA-TriCk-E
I am getting an exception when I try to call the CreateAccount() method within the NLS class, here is the exception:
[code]
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)
[/code]

Here is my code:
[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!");
            }
[/code]

Any thoughts or suggestions?

I am using MBNCSUtil 2.0.3.15

[Edit: deleted long line that was breaking the layout.]
October 27, 2007, 11:40 AM
iNsaNe
why not just do this?

[code]nls.CreateAccount(x52);[/code]
October 27, 2007, 5:27 PM
DDA-TriCk-E
If you read the documentation, it returns the length of the data... Therefore if the CreateAccount() call fails it would send a malformed packet...
October 27, 2007, 8:15 PM
Myndfyr
Hm, what version of .NET are you using (2.0 or 3.5)?  Are you using a Visual Studio 2008 beta?
October 27, 2007, 10:37 PM
DDA-TriCk-E
.NET 2.0, VC# Express 2005
October 28, 2007, 7:57 AM
Myndfyr
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.
October 28, 2007, 9:47 AM
DDA-TriCk-E
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
October 28, 2007, 10:16 AM

Search