• Welcome to Valhalla Legends Archive.
 

[Delphi] BNLS Connecting

Started by PaiD, August 04, 2005, 02:49 AM

Previous topic - Next topic

PaiD

I am tring to connect to BNLS via Delphi. I am tring to send the verbyte request


procedure TfrmMain.BNLSConnect(Sender: TObject);
begin
  AddC(clWhite,'Connected To BNLS');
  Buffer := #1;
  SendBNLS($10);
end;



procedure TfrmMain.SendBNLS(PacketID : Byte);
//(WORD)      Message Length, including this header
//(BYTE)      Message ID
//(VOID)      Message Data
var
  Len: Word;
begin
  Len := Length(Buffer) + 1;

  frmMain.BNLS.SendStream(Chr(Len) + PacketID + Buffer);
end;

When ever I try to compile I get an error telling me
[Error] UMain.pas(86): E2008 Incompatible types and highlights frmMain.BNLS.SendStream(Chr(Len) + PacketID + Buffer);

The declares are

Len: Word;
PacketID : Byte;
Buffer: WideString;

Any1 know how I can get this to work?

Edit: Spelling

MyndFyre

Out of curiousity, are you the one using Delphi 2005?  Isn't that developed for .NET?
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.

PaiD

Yea I am using 2005 and you dont need to develop for .Net

R.a.B.B.i.T

A word is 2 bytes *cough*.  You are trying to make an ASCII char out of a 2 byte value.  :X

PaiD

that isnt my problem I dont think. SendStream() wants a TString

Kp

Quote from: rabbit on August 04, 2005, 11:45 PMA word is 2 bytes *cough*.  You are trying to make an ASCII char out of a 2 byte value.  :X

Actually, a word's size depends on the host architecture.  On an x86, a word is 4 bytes.  No one wants to go back to the days of 2byte words, because those were the days of real mode.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Warrior

Okay, let's just say a word is half a double word? Mmk.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

l)ragon

*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*