New answers tagged

1

I don't have enough reputation to leave a comment, but I highly recommend checking out NexusForever : https://github.com/NexusForever/NexusForever/ It is also a game server emulator, and their implementation seems close to yours. It has been a great resource for me, and I hope it can help you too. I think your packets should only read the incoming data. ...


6

Quick bits You have some issues that some linters would pick up: I would suggest moving your main code into a function. So that it doesn't pollute the global namespace. You've got some trailing whitespace. Add some docstrings to your code. Even something basic like "Fetch words in answers." Your imports are kinda all over the place. I can't make any sense ...


3

Good job using const for values, as well as let for re-assignable values like counter and rejected. Did you test this code? My presumption is that it didn't happen, because when I tried running it, I see the following error: error promise.then is not a function This is because the promises are spread out: function all (...promises) { Without the ...


-2

let arr = [] new Promise((res, rej) => { for (let index = 0; index < 5; index++) { new Promise((resolve, reject) => { resolve(index) }) .then((i) => { arr.push(index) }) } res() }).then(() => { console.log(arr) }) // ----- async function processArray(array) { if(...


1

Does this code work? The _featureIndicatorFlagCache is set right away and is never cleared out. So the check if it's null will always be false and send back just he default and never execute GetProjectFeatureIndicatorsStatusAsync. I assume you want to cache the call to GetProjectFeatureIndicatorsStatusAsync but you won't be able to store that in one ...


Top 50 recent answers are included