• Welcome to Valhalla Legends Archive.
 

A question about the Warcraft III Clan System

Started by Arthas, September 29, 2003, 11:15 PM

Previous topic - Next topic

Arthas

Storm, I read it, and that helped a little bit, mostly on the edition of some new knowledge into my packet handling functions, thanks for that.

On a second note, my uber newbie skills pile up even more.

In the 0x68 packet(Remove Friend), it's just the index, my code works until it hits 10, which is all of a sudden "A", 11 "B", 12 "C", ect. I'm confused, should I make a function that turns A into 10, B into 12, C into 13, or is there a better way of going about this?

EG:

Index = Mid(data, len(data), 2)

Index can be anything in between 0 and 9, after that it starts to be letters(Last I checked letters weren't numbers...).

So, that's why I ask how do I change hex into bytes.

To my knowledge, 2 digits in hex = 1 byte. Now in 0x68, 0D isnt a number, though the index is still 13. You probably know all this and get the question anyways... Help! :)

Skywing

Quote from: Arthas on October 06, 2003, 04:41 PM
Storm, I read it, and that helped a little bit, mostly on the edition of some new knowledge into my packet handling functions, thanks for that.

On a second note, my uber newbie skills pile up even more.

In the 0x68 packet(Remove Friend), it's just the index, my code works until it hits 10, which is all of a sudden "A", 11 "B", 12 "C", ect. I'm confused, should I make a function that turns A into 10, B into 12, C into 13, or is there a better way of going about this?

EG:

Index = Mid(data, len(data), 2)

Index can be anything in between 0 and 9, after that it starts to be letters(Last I checked letters weren't numbers...).

So, that's why I ask how do I change hex into bytes.

To my knowledge, 2 digits in hex = 1 byte. Now in 0x68, 0D isnt a number, though the index is still 13. You probably know all this and get the question anyways... Help! :)
What datatype is Index?

Zakath

Yes, if it's a numerical type, most (all?) programming languages supply a means for dealing with hexadecimal numbers. For instance, in C and C++, adding "0x" to the front of the number prompts the compiler that it's in hex.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Arthas

Quote from: Skywing on October 06, 2003, 05:35 PM
What datatype is Index?

Index is a byte, what exactly do you mean by datatype besides that?

Skywing

Quote from: Arthas on October 06, 2003, 05:45 PM
Quote from: Skywing on October 06, 2003, 05:35 PM
What datatype is Index?

Index is a byte, what exactly do you mean by datatype besides that?
You are storing it in an integral type, then.  You can print it out using hex or decimal, but the internal representation (and thus the value) of the variable are independant of which base you use to display it.

Arthas


Kp

Quote from: Arthas on October 06, 2003, 04:41 PM
Storm, I read it
Someone actually took $t0rm's advice!  It's the end of the world!
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Banana fanna fo fanna

I think he was just saying that to prove he read my post, not neccessarily used it or anything.

|