Closed lee-dohm closed 4 years ago
Hey, thanks for reporting this issue! Unfortunately I haven't been involved in Screeps for a while so I'm not sure what might be causing this, but my suspicion is that it's something involving the screeps-api
package (specifically, the socket API for accessing Screeps servers). Upgrading that version may resolve the issue. If you are interested in taking a look into this, please feel free to open a pull request.
Thanks!
It looks like the format of the data returned from the api is different in getWatchExpressions
, causing val.expressions
to not exist. It should now be val.data.expressions
. I'll do some more testing and submit a PR.
{ "ok": 1, "data": { "expressions": {}, "values": { "foo": "bar" } } }
Thanks for investigating, @pyrodogg. I'd be happy to accept a PR once you've confirmed.
When I commented last week I had a fix working with screeps-api 1.7.2, which is the version currently used by screeps-multimeter. However, I also wanted to make sure it worked with latest version of screeps-api , which led down a rabbit hole resulting in a PR on that project.
The direct fix needed for screeps-multimeter doesn't change so I'll submit a PR for this with screeps-api 1.7.2.
Separately, I'll take a look at a PR to update the references including screeps-api once that patch is applied.
A new version of screeps-api was pushed a few hours ago. Reinstall screeps-multimeter, and status bar watch should now be working correctly.
I installed the
watch-client.js
file in my code base as the instructions said. And I call it at the end of my game loop as can be seen in myForeman.endShift()
function which is called as the very last line in the loop.Below is the console output from executing
/watch status _.keys(Game.creeps).length
as described in the documentation, along with some things that I did to try to debug the problem myself: