Negative value of TimeTillHiddenMs
See original GitHub issueI’m using code like this to get spawned pokemon on users location
Pokeio.Heartbeat(function (err, hb) {
if (err) {
return errorHandler(err, callback);
}
for (let i = hb.cells.length - 1; i >= 0; i--) {
if (hb.cells[i].WildPokemon) {
for (let j = 0; j < hb.cells[i].WildPokemon.length; j++) {
console.log(hb.cells[i].WildPokemon[j].TimeTillHiddenMs / 1000);
}
}
}
});
and sometimes get negative values (like -375492.726
) of TimeTillHiddenMs / 1000. What is the right way to handle them? Didn’t have opportunity to locate bug somewhere near mine location so could check what happenning in game at the moment.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Number.NEGATIVE_INFINITY - JavaScript - MDN Web Docs
The Number.NEGATIVE_INFINITY property represents the negative Infinity value.
Read more >How to use a negative value in table's variable (i... - ServiceNow
I want the value of the variable field integer in the negative, there is some script is running background to calculate the client...
Read more >Negative Values with Dependence - XBRL US
This rule tests that the values for a given list of elements are negative when a ...
Read more >NEGATIVE TIME VALUE - Microsoft Community Hub
I have a report that is being exported from Global Shop Solutions > Crystal Reports Viewer and then into Excel. I have 2...
Read more >Are there any consequences to having negative values in your ...
Many time series models assume Gaussian error terms, meaning that all real numbers are possibilities. In that sense, negative values are ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suppose a possible way to resolve this issue would be to provide an example for how to deal with this in
example.js
.I have been dealing with it by simply providing a check in the heartbeat function like:
@andnp Ok i did some testing. Catching it or not doesn’t seem to have any effect. It however changed after some minutes that i catched.
Probably it is true that those pokemon have a > 15min timer, and while it is > 15min it has a negative value. But it is strange that with a Catching bot there are problems, while in game not.