View Single Post
  #1  
Old 10-24-2008, 04:34 PM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default Need help dumping structs

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:

Code:
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.
Reply With Quote