Lonster_Monster Posted October 17, 2017 Report Posted October 17, 2017 The Error I am Getting isvar item = theirItems.market_name ^Type:Error: Cannot read property 'market_name' of undefined it is the The Trade Offer part of my Code the Code Is Below That is to Process Their Items in the Trade Offer for (var i in theirItems) { var item = theirItems[i].market_name if (stock[item]){ currentstock = stock[item].instock; StockLimit = stock[item].stocklimit;I ahve been Creating My OWn Code and not sure why the Error i got has Occurred Quote
TheXeon Posted October 17, 2017 Report Posted October 17, 2017 This can be solved by using i.market_name instead of theirItems[i].market_name. Because you are using a foreach-like syntax, each i will become the ACTUAL object in the array, rather than an iterating index. Quote
Lonster_Monster Posted October 18, 2017 Author Report Posted October 18, 2017 ok thanks that helped Quote
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.
Note: Your post will require moderator approval before it will be visible.