does anyone know how to fix those. When it comes to ESX stores the GUI open but there is nothing in the store and there are items/food in the database for it i am not sure why its doing it.

did you add stores and items in it not just items in the “items” table

I have not added anything custom to it at all

the only thing i been doing is editing some scripts that has nothing to do with ESX frame work or shops

open your database and execute:

INSERT INTO `shops` (store, item, price) VALUES
	('TwentyFourSeven','bread',30),
	('TwentyFourSeven','water',15),
	('RobsLiquor','bread',30),
	('RobsLiquor','water',15),
	('LTDgasoline','bread',30),
	('LTDgasoline','water',15)
;

if the table not exist then:

CREATE TABLE `shops` (
	`id` int(11) NOT NULL AUTO_INCREMENT,
	`store` varchar(100) NOT NULL,
	`item` varchar(100) NOT NULL,
	`price` int(11) NOT NULL,

	PRIMARY KEY (`id`)
);

INSERT INTO `shops` (store, item, price) VALUES
	('TwentyFourSeven','bread',30),
	('TwentyFourSeven','water',15),
	('RobsLiquor','bread',30),
	('RobsLiquor','water',15),
	('LTDgasoline','bread',30),
	('LTDgasoline','water',15)
;

I am getting this error now after executing that code

what is your server.cfg look like on which place did you start esx_shops

btw I use esx_supermarket

MAIN RESOURCES

start mapmanager
start chat
start chat-theme-civlifechat
start esx_rpchat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ■■■■■■■
start scoreboard
start playernames
start prison-map-addon
start DBGTaxiOverhaul
start ASGRPVehiclesOnly
start bob74_ipl
start PillboxHospital-by-Jobscraft

LOADING SCREEN

start loadingscreen

MYSQL ASYNC

start mysql-async
start async

MAIN ESSENTIALMODE RESOURCES

start essentialmode
start es_plugin_mysql
start es_extended
start es_admin2

MENU RESOURCES

start NativeUI

ESSENTIALMODE CRON JOB

start cron

ESSENTIALMODE RESOURCES

start esx_service
start esx_map
start esx_shops
start esx_extraitems
start new_banking
start esx_status
start esx_menu_default
start esx_menu_list
start esx_menu_dialog
start esx_gym
start esx_optionalneeds
start instance
start esx_billing
start esx_addonaccount
start esx_addoninventory
start esx_society
start esx_datastore
start esx_identity
start esx_migrate
start esx_vehicleshop
start esx_lscustom
start skinchanger
start esx_skin
start esx_clotheshop
start esx_license
start esx_dmvschool
start esx_property
start esx_garage
start esx_criminalrecords
start esx_celldoors
start esx_drugs
start esx_selldrugs
start esx_crafting
start esx-ecobottles
start esx_hospital
start esx_borrmaskin
start esx_holdupbank
start esx_panicbutton
start esx_blackmoney
start esx-carrental
start esx_hunting
start esx_cinema
start pNotify
start esx_lapdance
start esx_alpr
start esx_jb_realtimejailer
start esx_holdup
start esx_legacyfuel
start esx_cruisecontrol
start esx_custom_tattoos
start esx_tattoos
start esx_barbershop
start esx_ktackle
start esx_carlock
start esx_lootDeadbody
start esx_mugging
start esx_realweapons
start esx_addons_gcphone
start gcphone
start 3dme
start esx-qalle-jail
start t0sic_inventoryui
start esx_kashacters
start esx_bobbypin
start esx_weaponshop
start esx_pickweed
start lkrp_notepad
start 99kr-burglary

ESSENTIALMODE JOBS

start esx_joblisting
start esx_policejob
start esx_jobs

VEHICLE RESOURCES

start gruppe
start civ_veh
start 2014_CHP_BMW
start 2014_Dodge_Charger
start State_CrownVic

RESOURCES

start loadipl
start speedo
start calmai
start realaitraffic
start arrestanims
start lux_vehcontrol
start lesslethal_shotgun
start SaveWheel
start disabledispatch
start Tackle
start shield
start interrogator
start InteractSound
start qalle_coords
start NativeUI
start eup-stream
start eup-ui

try to move esx_shops at the bottom of esx scripts “ESSENTIALMODE RESOURCES” load it the last one

nope its still got the same error i just can rap my head around this lol

don’t worry we all have problems with fivem scrips :)) I’m still here today waiting for some help but no luck… at the end, I will have to spend a few days to fix some stupid problem :slight_smile:

scripts can be a pain in the ass lol

When getting errors in the logs like:
attempt to index a nil value (field ‘?’)
it tends to be because of the data fetched from the Database is empty.

i keep looking into but i dont see anything wrong in the database GOD DAM I HATE DATABASE !!! lol :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.