Jump to content
SubSpace Forum Network

Recommended Posts

Posted
Ekted, hate to be picky, but your method is completely unportable, which is why its generaly a good idea to use functions to pick data out of a string of bytes, then it is to try and stuff a string of bytes into a struct !@#$%^&*uming the architecture the program is running on uses the same byte order as yours. Of course, if you just want to program like Microsoft, then it hardly matters. Youll notice this kind of blunder in LogicBot in the Settings area. Ive been working on making it endian (sp?) independent. God I hate spelling... Anyway, thats my 1 and 1/2 cents worth.
Posted
C supports structure packing so you can make it match any file/network data. The only issue, as you say, is byte ordering. It is more efficient and clean to view and manipulate packets with structures. It is also less prone to error. It is not unportable whatsoever, or even less portable than the way MERV does it. In fact, the only reason MERV does it that way is because it was originally written in VB which doesn't have structures, so Catid had no choice. When he ported to C++, he just brought over the code as-is for the most part. That's my $2. Keep the change.
Posted
the only reason MERV does it that way... is because i was learning the protocol as i was writing the bot, and it was easier to write that way. i make up for it by doing those nifty packet diagrams, which i use as a reference as much as the next guy
Posted
A compiled version of what? Merv is up and available. A premade version of my packet class will do absolutely nothing for you. Just binaries that you cant use. All but the typedefs and includes are cut+paste in. I just typed in the typedefs and includes because theyre in diferent files in my bot. Are you sure youre using a console application? Are you sure you have right args in main?
Guest
This topic is now closed to further replies.
×
×
  • Create New...