Strange error with Greenworks Plugin

0 favourites
  • 4 posts
From the Asset Store
Strange Game Ambient Loops 3 - This is the third volume in the Strange Game series.
  • Hey Construct Community.

    I have a very strange error (or behavior I don't understand)

    when using the greenworks plugin, I't seems that construct reactes strange with the Steamid it gives out.

    the first number, is my steamid as it is directly read by the greenworks plugin.

    the secund number is my steamid when i save it into a global variable first..

    for whatever reason, it just changes the last 2 digits. it does the same, when i try to enter my steamid directly into the variable.

    Typing in the number:

    after pressing enter:

    why is this happening?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I know that the safe integer size in Javascript is 2^31-1, or 2147483647, although Construct 3 Runtime uses now WebAssembly instead of Javascript.

    It may be that the integer is too large and that the number is between a very large displayable number and a scientific number display like for example 2.5263267568663284e+26, so something's going wrong.

    So maybe the number you are putting into the variable is just too large. Can't you use a string instead of number type as the ID?

    Hopefully someone has a better idea on this, so if nothing it's a start and I bumped your post.

  • Hey Wulfy,

    you are right.

    Looks like the number was to large. Using a string would have been a solution. Problem was, I had to calculate with the number.. wich started the rounding process.

    I resolved the problem by letting the calculation be handled by my PHP on my server.

  • I know that the safe integer size in Javascript is 2^31-1, or 2147483647, although Construct 3 Runtime uses now WebAssembly instead of Javascript.

    Actually it's 2^53-1, which is 9007199254740991. This is the integer precision of double precision floats that JavaScript uses for numbers. The runtime does not use WebAssembly for the core runtime, it's still JavaScript.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)