int pc_countitem(struct map_session_data* sd,int itemid)//[Hold -brA]{struct item_data* it_tmp;int i, id, amt =0;if(!(it_tmp = item_db.exists(itemid)))return0;
id = it_tmp->nameid;for(i =0; i < MAX_INVENTORY; i++)if(sd->inventory.u.items_inventory[i].nameid == id)
amt += sd->inventory.u.items_inventory[i].amount;return amt;}
Anyone can help me adapt this code for Reathena pls
Question
Zharor
Anyone can help me adapt this code for Reathena pls
Code 01 ERROR - storage_storageadd(sd, item->nameid, 1, LOG_TYPE_NONE);
Code 02 ERROR - if(! (it_tmp = item_db.exists(itemid))) return 0 ;
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.