set substructdatabyname
Posted: Mon Jun 26, 2017 6:25 am
in the below code with Whats wrong with me on it, cause a complile error (see below), but if a replace item->details with "hello", a string in quotes it compiles, i dont understand why since item->name is a string value
errors here
Code: Select all
item = master_item_list.GetItemByName(recipe->GetName());
if (item) {
packet->setSubstructDataByName("recipe_info", "product_icon", item->details.icon); //item->details.icon);
packet->setSubstructDataByName("recipe_info", "product_name", item->name); //item->name //WHATS WRONG WITH ME
packet->setSubstructDataByName("recipe_info", "product_qty", 1);
packet->setSubstructDataByName("recipe_info", "product_item_id", item->details.item_id); //item->details.item_id);
//packet->setSubstructDataByName("recipe_info", "product_item_crc", item->details.item_crc); //item->details.item_crc);
}