seishun / node-steam-trade

Node.js wrapper around Steam trading
162 stars 36 forks source link

TypeError: Cannot read property 'filter' of undefined #64

Closed chuahbc closed 9 years ago

chuahbc commented 9 years ago

So I'm getting this error and is this something to do with node-steam updating to 1.0.0? I followed exactly from scrapbank.js which is not updated

var inventory = inv keys = inv.filter(function(item) { return item.name == 'Mann Co. Supply Crate Key';}); TypeError: Cannot read property 'filter' of undefined

cymruu commented 9 years ago

inv is undefined, try to get older version of node-steam but honestly im not sure if its related on this https://github.com/seishun/node-steam/releases/tag/v0.6.8

chuahbc commented 9 years ago

@cymruu edited, I don't think that is the problem because the error is on filter not inv

cymruu commented 9 years ago

@MajorErection 'filter' of undefined

chuahbc commented 9 years ago

Is there no way I can use 1.0.0? because I pretty much wrote everything for 1.0.0

andrewda commented 9 years ago

@MajorErection Obviously you have an error somewhere, your inv variable is undefined. Add the code that you're using and we might be able to help.

chuahbc commented 9 years ago

http://pastebin.com/KVu24Uih

cymruu commented 9 years ago

@MajorErection what returns http://steamcommunity.com/my/inventory/json/440/2

chuahbc commented 9 years ago

@cymruu I don't mean to be annoying here but what am I suppose to do with that information? I'm new to javascript so please be patient with me :/

cymruu commented 9 years ago

@MajorErection just tell me what is the result when you click the URL. It returns success: false for me, but dunno why. maybe becouse i have no dota 2 on my account, or the query is bad and return false for everyone

chuahbc commented 9 years ago

@cymruu it wasn't for dota 2 but for tf2 but I basically got the classid and instanceid for everything in that inventory

http://pastebin.com/1JV3gk7R

cymruu commented 9 years ago

@MajorErection ok, sorry i don't remember every game ID. steamTrade.loadInventory returns no inventory, possibly youre not logged (if your inv is private) or steam is down or other shit, can't tell you :<

chuahbc commented 9 years ago

@cymruu so what you're saying is that it could be steam's issue?

cymruu commented 9 years ago

@MajorErection unlikely

seishun commented 9 years ago

This is not a forum, please ask for help elsewhere (https://github.com/steam-forward/node-steam-forum seems to be beginner friendly).