rektbot Posted February 19, 2017 Report Posted February 19, 2017 (edited) Hi There, Having a callback issue with the changeEmail command. Any help would be very appreciated. Code: (logOnOptions removed) function ChangeEmail(password){ client.changeEmail(password, myemail, function(err) { console.log(err); emailDone = true; // just a poor handler, still get error without it. }); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); ChangeEmail(password); }); Error: /node_modules/steam-user/components/account.js:143 callback(Helpers.eresultError(body.eresult)); ^ TypeError: callback is not a function I have also tried simplifying to: client.changeEmail(password, myemail); Edited February 20, 2017 by rektbot Quote
Dr. McKay Posted February 20, 2017 Report Posted February 20, 2017 That's not the correct signature. Quote
rektbot Posted February 20, 2017 Author Report Posted February 20, 2017 Apologies I must be missing something but I can't spot it. password and new email are mandatory options;code, twofactor, sms are optional (code is optional in first instance)callback is optional; i've tried setting err & smsemailCould you give me a gentle nudge in the right direction please? Quote
Dr. McKay Posted February 20, 2017 Report Posted February 20, 2017 client.changeEmail({"password": password, "newEmail": myemail}) Quote
rektbot Posted February 20, 2017 Author Report Posted February 20, 2017 Ah I have to be explicit. Sorry for being a noob. Paypal donation sent as thanks. 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.