-
Posts
4 -
Joined
-
Last visited
Posts posted by MrKirby
-
-
I am having issues with calling this function. I think it has something to do with the function waiting a little while. I have searched for callback etc. on the internet and I found a lot but I have no clue how to use them on the code...
Question
How do I use sync callback on the function: "getUserInventoryContents"
This is what I have now:
manager.getUserInventoryContents(config.accounts.steamid64[i],753, 6, true, (err, inventory) => { if (err) { console.log(err); return; } else if (err == null) { //The rest of the code
I thought that this would work... I am not the best in node, basically just started... but hope you could help me
-
After some time having trouble with it (as I am new), I got it to work! Thanks so much dude! for everyone else wondering.. I used this:
client.on('friendMessage', function(steamID, message) { friendID = [steamID]; client.getPersonas(friendID, function(getName) { var x = getName[friendID]; var friendName = x.player_name; console.log("[FriendlyMessage] " + friendName + ": " + message); } });
Brackets could be wrong because my code didn't stop there and I am correcting it within the text editor
I do have another question and I don't know if I should ask it here?
But, what are the numbers for friendrelationships??
I know 2 is friend request send to me. But where can I find it.. because I am having trouble finding everything...
EDIT: After actually turning my brain on.. I checked within the files of your node and found a file with the numbers.... Shit I'm stupid... Thanks anyway!! GREAT SHIT DUDE!!!
-
Hey, I started using Node.js and javascript a short time ago.
I was trying to display my own username in console after logon. And if that worked, I'd try for others.
I was hoping if you could help me.
This is my code:
client.on('loggedOn', function() { console.log("[Steam-BOT] Logged in as " + client.steamID); var botSteamID = [client.steamID]; var clientName = client.getPersonas(botSteamID); });
So I thought this was the way to go but, clientName stays unidentified.
I do not know what I am doing wrong
Thanks in advance!
Async problems using "getUserInventoryContents"
in node-steam-tradeoffer-manager
Posted · Edited by MrKirby
Thanks for the quick response, but it is not what I am looking for, I think.
Whenever it is busy 'getting' a user's inventory, it should freeze a code block (like a normal callback function could do).
But I have no clue on how to run a callback on the "getUserInventoryContents" functoin.
EDIT:
This will output:
Now, how can I make it output this:
Thanks in advance