EvoZak
10-24-2008, 04:34 PM
I'm having the damnest time just trying to dump out some structs to the log files. Seems like it ought to be simple but I'm not the world's best c coder.
Anyone have a quick line of code to dump out a struct's entire contents to the log file? Here's what I've started with:
unsigned char *tmpbuff = new unsigned char[sizeof(PlayerProfile_Struct) + 2];
outapp->serialize(OP_PlayerProfile, tmpbuff); // outapp is a PP Packet
LogFile->write(EQEMuLog::Debug, "packet:%s", tmpbuff);
all I get is a single ascii char in the log file. Any help is appreciated.
Anyone have a quick line of code to dump out a struct's entire contents to the log file? Here's what I've started with:
unsigned char *tmpbuff = new unsigned char[sizeof(PlayerProfile_Struct) + 2];
outapp->serialize(OP_PlayerProfile, tmpbuff); // outapp is a PP Packet
LogFile->write(EQEMuLog::Debug, "packet:%s", tmpbuff);
all I get is a single ascii char in the log file. Any help is appreciated.