View Single Post
  #1  
Old 09-22-2003, 07:57 AM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default Linux Compile Broken on 0.5.0DR3

Looks like line [client_process.cpp:4333] is not using the new item classes properly. It's passing int16 failedproduct into PutItemInInventory when an ItemInst object is expected. This causes the compile to fail when using gcc 3.2.

I suspect this was just one conversion to the new item structs that slipped through the cracks.

I changed from this:
Code:
else{
  this->Message(4,"You lacked the skills to fashion the items together.");
  if (failproduct!=0)                               
    PutItemInInventory(30,failproduct,1);                        
}
to this:
Code:
else{
  this->Message(4,"You lacked the skills to fashion the items together.");
  if (failproduct!=0) {
    const Item_Struct* myitem = database.GetItem(failproduct);         
    ItemCommonInst common(myitem, 0);                                  
    PutItemInInventory(30,(ItemInst&)common,1);                        
  }
}
I'm not sure if going to the database is appropriate here, so if there's a better solution, post away!

regards,

krich
Reply With Quote