Matt Posted March 20, 2013 Author Share Posted March 20, 2013 If you were buying an item in a shop that costs 10 gold coins, of which you have 30 of, and the rest of your inventory was filled with other items, the transaction would still go through, but because you don't have enough room in your inventory, the item is lost.Right above``` TakeInvItem index, .costitem, .costvalue GiveInvItem index, .Item, .ItemValue```put there``` If FindOpenInvSlot(index, .Item) = 0 Then Call PlayerMsg(index, "You don't have enough room in your inventory!", BrightRed) Exit Sub End If``` Link to comment Share on other sites More sharing options...
Alerd Posted March 20, 2013 Share Posted March 20, 2013 Thanx work :> Link to comment Share on other sites More sharing options...
Matt Posted March 20, 2013 Author Share Posted March 20, 2013 Make sure you pasted the new code above the two lines that handle taking the cost item and giving the item. Link to comment Share on other sites More sharing options...
Valentine90 Posted March 20, 2013 Share Posted March 20, 2013 Good! thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now