We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For user code, Game.cpu.getUsed() returns NaN which seems to also be corrupting bucket data.
Game.cpu.getUsed()
NaN
Steps to reproduce: after starting a server and resetting its data, get spawned in and set this main module code as the whole bot:
module.exports.loop = function () { console.log(`cpu used ${Game.cpu.getUsed()}, ${JSON.stringify(Game.cpu)}`); }
This results in the output: cpu used NaN, {"tickLimit":100,"limit":100,"bucket":0} each tick; the bucket number never accumulates.
cpu used NaN, {"tickLimit":100,"limit":100,"bucket":0}
In the database, the user's bucket value (cpuAvailable) is NaN, as well as a couple other CPU values:
cpuAvailable
storage.db["users"].findOne({ username: "bot" }) { #...(snipped irrelevant fields)... cpu: 100, cpuAvailable: NaN, active: 10000, lastUsedCpu: NaN, lastUsedDirtyTime: NaN, }
Setting cpuAvailable to an integer value has no apparent effect and seems to be written back to NaN on next tick.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For user code,
Game.cpu.getUsed()
returnsNaN
which seems to also be corrupting bucket data.Steps to reproduce: after starting a server and resetting its data, get spawned in and set this main module code as the whole bot:
This results in the output:
cpu used NaN, {"tickLimit":100,"limit":100,"bucket":0}
each tick; the bucket number never accumulates.In the database, the user's bucket value (
cpuAvailable
) isNaN
, as well as a couple other CPU values:Setting
cpuAvailable
to an integer value has no apparent effect and seems to be written back toNaN
on next tick.The text was updated successfully, but these errors were encountered: