witam, otóż próbuje tutaj dodać data do linku ale niestety nie działa ma ktoś pomysł jak to mam umieścic zeby post zwracał inventory=1/2/3 z data?
const Inventor = data => {
if(typeof data != 'object') {
throw new Error('Cannot send request! Bad data typeof');
}
$.post('game.php?task=inventor&inventor={data}', data , response => {
response = JSON.parse(response);
if(response.ok) {
}else{
alert(response.msg);
}
});
}
udało mi się rozwiązać ten problem używając object:
$.post('game.php?task=inventor&inventor='+Object.values(data), data , response => {
no chyba że ktoś ma lepszy, krótszy pomysł