Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: CrAz3D on February 20, 2005, 08:56 PM

Title: Text not being displayed
Post by: CrAz3D on February 20, 2005, 08:56 PM
This is the message, it IS being sent to bnet & recieved by the regular SC client, but it isn't displayed, any idea why?  Maybe the » character?
Quote
CrAz3D-»LIPOXAMGSF Added by:CrAz3D[xL]
Title: Re: Text not being displayed
Post by: R.a.B.B.i.T on February 20, 2005, 10:33 PM
Debugoutput() it, look for nasty low-ascii characters, because » is safe to use (I use it a lot).
Title: Re: Text not being displayed
Post by: CrAz3D on February 20, 2005, 11:41 PM
Quote from: rabbit on February 20, 2005, 10:33 PM
Debugoutput() it, look for nasty low-ascii characters, because » is safe to use (I use it a lot).
low-ascii?

Title: Re: Text not being displayed
Post by: tA-Kane on February 21, 2005, 02:35 AM
< 32
Title: Re: Text not being displayed
Post by: CrAz3D on February 21, 2005, 09:58 AM
From what I see, my ascii characters range from 32 to 122.  Any other ideas on why the SC client isn't displaying the text?
Title: Re: Text not being displayed
Post by: CrAz3D on February 21, 2005, 06:33 PM
Quote from: CrAz3D on February 21, 2005, 09:58 AM
From what I see, my ascii characters range from 32 to 122.  Any other ideas on why the SC client isn't displaying the text?
Hmm, all of my characters are 32 & above.

EDIT:

» isn't safe to use.  When sending » from my REAL SC client to bnet, the bot client recieved ».  » is an invalid character for bnet now.  So, AFAIK, characters of 187 or higher are invalid for the SC client.  I haven't tested characters lower than 187 & higher than X, but I tested a few higher than 187.
Title: Re: Text not being displayed
Post by: Blaze on February 21, 2005, 06:39 PM
Perhaps its just a bug in starcraft?
Title: Re: Text not being displayed
Post by: TaGBaN on February 22, 2005, 06:12 AM
Its not a bug, its actually them fixing a bug. The reason color codes were ever avaiblie was from a bug. And that but also assisted in allowing those charactors.
Title: Re: Text not being displayed
Post by: Warrior on February 22, 2005, 06:41 AM
In a stupid attempt to fix colors they screwed up some chars? Lol.
Title: Re: Text not being displayed
Post by: CrAz3D on February 22, 2005, 09:18 AM
Isn't that AWESOME!  Go B.NET!
Title: Re: Text not being displayed
Post by: Kp on February 22, 2005, 04:18 PM
No, in a successful attempt to fix colors they require you to actually emulate the client a bit better now.  As was posted about several versions ago, Starcraft uses UTF8 coding of characters.  Sending a bare » is wrong.  You should be sending it encoded in UTF8, as Starcraft does.  That it worked at all since the switch to UTF8 is arguably a bug, which is now fixed.
Title: Re: Text not being displayed
Post by: CrAz3D on February 22, 2005, 05:24 PM
Quote from: Kp on February 22, 2005, 04:18 PM
No, in a successful attempt to fix colors they require you to actually emulate the client a bit better now.  As was posted about several versions ago, Starcraft uses UTF8 coding of characters.  Sending a bare » is wrong.  You should be sending it encoded in UTF8, as Starcraft does.  That it worked at all since the switch to UTF8 is arguably a bug, which is now fixed.
How would I send my text as UTF8 code?
Title: Re: Text not being displayed
Post by: soLo.abUse on February 22, 2005, 05:27 PM
Quote from: CrAz3D on February 22, 2005, 05:24 PM
Quote from: Kp on February 22, 2005, 04:18 PM
No, in a successful attempt to fix colors they require you to actually emulate the client a bit better now.  As was posted about several versions ago, Starcraft uses UTF8 coding of characters.  Sending a bare » is wrong.  You should be sending it encoded in UTF8, as Starcraft does.  That it worked at all since the switch to UTF8 is arguably a bug, which is now fixed.
How would I send my text as UTF8 code?

Assuming you're using Windows, MultiByteToWideChar() and WideCharToMultiByte().  Otherwise, if you're going to use Storm.dll you could use (If I remember correctly) Storm ordinal 912.
Title: Re: Text not being displayed
Post by: CrAz3D on February 22, 2005, 05:28 PM
Thank you much, I will look into that.

EDIT: Would I have to send it differently for D2, W2, & W3?
Title: Re: Text not being displayed
Post by: iago on February 22, 2005, 09:53 PM
Quote from: CrAz3D on February 22, 2005, 05:28 PM
Thank you much, I will look into that.

EDIT: Would I have to send it differently for D2, W2, & W3?

No, they all use UTF-8
Title: Re: Text not being displayed
Post by: CrAz3D on February 22, 2005, 10:04 PM
Quote from: iago on February 22, 2005, 09:53 PM
Quote from: CrAz3D on February 22, 2005, 05:28 PM
Thank you much, I will look into that.

EDIT: Would I have to send it differently for D2, W2, & W3?

No, they all use UTF-8
Okely dokey!, Thanks