Jump to content
McKay Development

ID event is not firing


tvman99

Recommended Posts

I have variable that contains steamid64. There is a reason using variable, Because it changes. This id event is not working, However it does with const. Does it work only with const? If yes, How can i make it work?

client.on('friendMessage#' + variable, function(steamID, message) {
  console.log("works");
  client.chatMessage(steamID, "works " + message);
});
Link to comment
Share on other sites

It works with initial value. So I think i should clear cache and refresh after every changes somehow. How can i achieve it without restarting whole nodejs app?

 

Edit: I found a way and it is only to check steamid is equal to variable within friendMessage  id event. 

Edited by tvman99
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...