Seeringfate Posted June 6, 2017 Report Posted June 6, 2017 Hi there, Is there a way to save sent offers to a file (save some needed information in it + the tradeoffer), that when this offer is accepted (or declined) that you run a block of code attached to this file ? As I see it now with the "receivedOfferChanged" you can only check if the offer is changed and do something with the steamid from the recipient.I want to run code which also use mySQL databases, so I need a way to save offers. If this is too much to ask it's alright. Thanks anyway ! Seeringfate Quote
AlaDyn172 Posted June 6, 2017 Report Posted June 6, 2017 Yes, you can do this by creating an object and then with 'writeFileSync' you write it on a file.And on starting the script call a function 'readFileSync' and for each offer to add it to an object.Then you can do whatever you want. xD Quote
Dr. McKay Posted June 7, 2017 Report Posted June 7, 2017 You can also connect to MySQL using Node: https://www.npmjs.com/package/mysql Quote
Seeringfate Posted June 8, 2017 Author Report Posted June 8, 2017 Fixed it by adding an extra table in MySQL and saving data there and after the trade is accepted or declined remove the data and execute code according to data in table. Thank for the help ! 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.