Failed to load script client/main.lua
Closed this issue · 2 comments
Kristukas1337 commented
Hello, so i'm trying to install esx_licenseshop and it shows me this error in F8 console Error parsing script @esx_linceseshop/client/main.lua in resource esx_licenseshop: @esx_licenseshop/client/main.lua:43: ')' expected near '='
ptitxandre commented
He forgot a bracket in every line from line 43... Replace the code from line 41 to line 111 with the code below and it will be good
if Config.AdvancedVehicleShop then
if not ownedLicenses['aircraft'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Aircraft))), value = 'buy_license_aircraft'})
end
if not ownedLicenses['boating'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Boating))), value = 'buy_license_boating'})
end
end
if Config.AdvancedWeaponShop then
if not ownedLicenses['weapon_melee'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Melee))), value = 'buy_license_melee'})
end
if not ownedLicenses['weapon_handgun'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Handgun))), value = 'buy_license_handgun'})
end
if not ownedLicenses['weapon_smg'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.SMG))), value = 'buy_license_smg'})
end
if not ownedLicenses['weapon_shotgun'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Shotgun))), value = 'buy_license_shotgun'})
end
if not ownedLicenses['weapon_assault'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Assault))), value = 'buy_license_assault'})
end
if not ownedLicenses['weapon_lmg'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.LMG))), value = 'buy_license_lmg'})
end
if not ownedLicenses['weapon_sniper'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Sniper))), value = 'buy_license_sniper'})
end
end
if Config.DMVSchool then
if Config.SellDMV then
if not ownedLicenses['dmv'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.DriversP))), value = 'buy_license_driversp'})
end
end
if not ownedLicenses['drive_truck'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Commercial))), value = 'buy_license_commercial'})
end
if not ownedLicenses['drive'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Drivers))), value = 'buy_license_drivers'})
end
if not ownedLicenses['drive_bike'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Motorcycle))), value = 'buy_license_motorcycle'})
end
end
if Config.Drugs then
if not ownedLicenses['weed_processing'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Weed))), value = 'buy_license_weed'})
end
end
if Config.WeaponShop then
if not ownedLicenses['weapon'] then
table.insert(elements, {label = ('%s - <span style="color: green;">%s</span>'):format(_U('license_aircraft'), _U('shop_menu_item', ESX.Math.GroupDigits(Config.Prices.Weapon))), value = 'buy_license_weapon'})
end
end
HumanTree92 commented
Fixed in ce37da7 thanks for noticing it @ptitxandre