feroff Posted July 18 Report Share Posted July 18 Hello. I want to make a script that keeps track of the balance on the account and the number of items in the inventory. If the balance has changed, I want to know how many items I currently have in my inventory. balance tracking works. Tracking items in the inventory no client.on('loggedOn', function() { client.gamesPlayed([730]); }); client.on('wallet', function(hasWallet, currency, balance) { csgo.on('connectedToGC', () => { let items = csgo.inventory.length - 2; console.log(items); }); console.log(username + ' | ' + SteamUser.formatCurrency(balance, currency) + ' | ' + new Date().toLocaleString()); let money = SteamUser.formatCurrency(balance, currency); }); I haven't done programming before, maybe the answer to my question is very easy Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted July 18 Report Share Posted July 18 You're adding a new connectedToGC handler every time you get the wallet event emitted, which isn't what you want to do. 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.
Note: Your post will require moderator approval before it will be visible.