Valhalla Legends Forums Archive | Battle.net Bot Development | [Delphi] BNLS Connecting

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

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

[code]
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;
[/code]
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
[code]
Len: Word;
PacketID : Byte;
Buffer: WideString;
[/code]
Any1 know how I can get this to work?

Edit: Spelling
August 4, 2005, 7:49 AM
Myndfyr
Out of curiousity, are you the one using Delphi 2005?  Isn't that developed for .NET?
August 4, 2005, 6:25 PM
PaiD
Yea I am using 2005 and you dont need to develop for .Net
August 4, 2005, 6:49 PM
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
August 5, 2005, 4:45 AM
PaiD
that isnt my problem I dont think. SendStream() wants a TString
August 5, 2005, 5:22 AM
Kp
[quote author=rabbit link=topic=12431.msg123141#msg123141 date=1123217116]A word is 2 bytes *cough*.  You are trying to make an ASCII char out of a 2 byte value.  :X[/quote]

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.
August 6, 2005, 1:52 AM
Quarantine
Okay, let's just say a word is half a double word? Mmk.
August 6, 2005, 3:50 AM
dRAgoN
[quote author=Warrior link=topic=12431.msg123269#msg123269 date=1123300213]
Okay, let's just say a word is half a double word? Mmk.
[/quote]

Short
August 6, 2005, 4:35 AM

Search