RookieNRG Posted April 28, 2011 Share Posted April 28, 2011 Hi currently my inventory has single items, i do have a merge link which merges all of the items into one. However i want eliminate the reason to merge and have items automatically add up if you buy items from market get sent etc. can anyone help me out to get the inventory re-coded? Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted April 28, 2011 Share Posted April 28, 2011 http://makewebgames.io/showthread.php/25677-mccode-v2-Merge-Item-s?p=245860 It was discussed over in that thread. I dont really see the need to have a merge link why not just auto update the inventory quantity Quote Link to comment Share on other sites More sharing options...
Dominion Posted April 28, 2011 Share Posted April 28, 2011 What version are you using? If v2 use the item_add() function. If not recreate it. Basic idea is to check if the item exists, if so simply add to the amount currently there, otherwise add the new item normally (so with an insert). Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted April 28, 2011 Share Posted April 28, 2011 (edited) yep item_add() will fix your problem no need for the quantifier. and also the automatic one that has been coded updates the inventory everytime a player clicks the inventory link,and the item numbers soar to the billions.... Edited April 28, 2011 by lucky3809 Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted January 15, 2012 Share Posted January 15, 2012 What version are you using? If v2 use the item_add() function. If not recreate it. Basic idea is to check if the item exists, if so simply add to the amount currently there, otherwise add the new item normally (so with an insert). i also need a merger for my inventory but im not a coder so how would i do that? Quote Link to comment Share on other sites More sharing options...
Dominion Posted January 15, 2012 Share Posted January 15, 2012 i also need a merger for my inventory but im not a coder so how would i do that? Check out the link posted by rulerofzu. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted January 15, 2012 Share Posted January 15, 2012 Check out the link posted by rulerofzu. yeah, i tried that but i couldnt get it to work for the life of me Quote Link to comment Share on other sites More sharing options...
Dominion Posted January 15, 2012 Share Posted January 15, 2012 yeah, i tried that but i couldnt get it to work for the life of me What version are you using? Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted January 15, 2012 Share Posted January 15, 2012 What version are you using? i am using v2 lol why would it not let me just say "v2" haha Quote Link to comment Share on other sites More sharing options...
Dominion Posted January 15, 2012 Share Posted January 15, 2012 For v2, as has been said, item_add() merges the quantities when used to add an item to a users inventory. Is there any reason it's not working? Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted January 15, 2012 Share Posted January 15, 2012 For people who dont know how to use the item_add I helped another person with this in this thread... http://makewebgames.io/showthread.php/40804-Please-help-search-streets?p=267219#post267219 you can get an idea how it is done. Quote Link to comment Share on other sites More sharing options...
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.