Closed skibaalex closed 6 years ago
i'm getting the correct data from the /auth/steam but then when im trying to access user.id it rounds the last number up or down
example the steam id 767561198140718655 turns to 767561198140718650 and the id 76561198822112084 turn into 76561198822112090
You should be saving the steamid as a string in your database
so basicly i cannot access it directly? could you show me an example of how to access it? its something to do with memory? an integer is a max 32 bit?
Basically, a SteamID overflows the capacity of JavaScript's number type. If you store and access it as a string instead (I can't think of any situation in which you'd need it to be a number) you'll be good to go. passport-steam
should return the SteamID as a string already, so I'd suspect something you're doing is converting or storing it as a number. You'll have to share your code for more in-depth answer.
yes you were right its allready a srting
i changed
var $id = <%=user.id%>;
to var $id = '<%=user.id%>';
and im good to go =]
just the last two number are incorrect. i have no clue why is that happenning