• Welcome to Valhalla Legends Archive.
 

[MBNCSUtil] NLS.CreateAccount()

Started by Chriso, October 27, 2007, 06:40 AM

Previous topic - Next topic

Chriso

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.]

iNsaNe

why not just do this?

nls.CreateAccount(x52);

Chriso

If you read the documentation, it returns the length of the data... Therefore if the CreateAccount() call fails it would send a malformed packet...

MyndFyre

Hm, what version of .NET are you using (2.0 or 3.5)?  Are you using a Visual Studio 2008 beta?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Chriso


MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Chriso

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