I've got a script which gets a bunch of information from an api and then lists it on my site. I then have a function, newLink(z) which is supposed to get the information from the new elements created and do stuff with it, to simplify it I'm just trying to console.log whatever it says below. Any number that I put into the brackets of the function, in this case 76561198008132325, has the last digit replaced with a 0 for whatever reason, resulting in the console logging '76561198008132320'. I've been scratching my head on this for a good half hour now and I literally can not figure out what is causing this.
var searchRequest = "https://api.roleplay.co.uk/v1/search/player?name=ant";
var searchData = "";
function success(data) {
for (i = 0; i < data['length']; i++) {
document.getElementById("searchResults").innerHTML += "<div class='result' onclick='newLink(76561198008132325)'>new link</div>";
}
}
function newLink(z) {
console.log(z);
}
$.ajax({
dataType: 'json',
url: searchRequest,
data: searchData,
success: success
});
<div class="results" id="searchResults">
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>