Hey guys,
I get the problem “Uncaught (in promise) ReferenceError: amount is not defined” in one resource.
The Console also says it is based in “nui/script.js:1086”
I dont know whats wrong… maybe you can help?
If you need any information feel free to ask ![]()
Pic about the code in script.js:1086
Code:
var obj;
if (type == Lang[config.lang].vehicles_page_title) {
obj = {product_id: product, plate: plate, name: name, type: 0, price: value, features: `${color}|${tune}`, class: classe, premium: premium, image: imageLink}
} else if (type == Lang[config.lang].items_page_title) {
obj = {product_id: product, name: name, type: 1, price: value, amount: amount, class: classe, premium: premium}
}
$.post("http://ecommerce/insertItem", JSON.stringify(obj), function (datab) {
if (datab === true) {
alertBox(Lang[config.lang].notify_created, 'rgb(54, 233, 158)', 'images/check.svg')
} else if (datab === 1) {
alertBox(Lang[config.lang].notify_insufficient_money_premium, 'rgb(251, 99, 99)', 'images/close.svg')
} else if (datab === 2) {
alertBox(Lang[config.lang].notify_no_item, 'rgb(251, 99, 99)', 'images/close.svg')
} else if (datab === 3) {
alertBox(Lang[config.lang].notify_blacklisted_item, 'rgb(251, 99, 99)', 'images/close.svg')
} else if (datab === 4) {
alertBox(Lang[config.lang].notify_invalid_value, 'rgb(251, 99, 99)', 'images/close.svg')
}
closePost()
});
}
Thanks for your help ![]()


