Can't use ESX at all

Hi there,

I’m new to the FiveM/ESX modding scene and I’m running my first time install but I can’t seem to use any ESX features such as pressing F2 for inventory. The current console is outputting no errors and all resources have loaded. The only error I can really find is in F8 with the following output:

Error resuming coroutine: @es_extended/client/functions.lua:1012: attempt to compare number with nil stack traceback:
** @es_extended/client/function.lua:1012: in field ‘ShowInventory’ **
** @es_extended/client/main.lua:463: in function <@es_extended/client/main.lua:458> **

I’ve booted up the server with the resources (in this order):

start mysql-async
start essentialmode
start fxmigrant
start esplugin_mysql
start es_admin2
start async
start es_extended
start esx_menu_default
start esx_menu_list
start esx_menu_dialog

Again, the server starts up, everything appears to be fine, but when trying to do anything in-game nothing happens. My best guess is a DB error, however, the only SQL I thought needed to be ran was es_extended.sql? I haven’t ran the esplugin sql since it appears to be replaced by fxmigrant. Any help would be greatly appreciated, thank you.

I am also receiving errors similar to Essiental mode errors a thread that also has no replies.

Upon further investigation it seems to be an issue with the table users (or lack of). It seems after everything I’ve done and downloaded, a proper users table was not created and is missing the following columns:

job
job_grade
loadout
position

…and so many others. If someone could share their template of a users table, I’m sure that would fix things.

I’ve managed to create a users table using info from https://github.com/kanersps/esplugin_mysql/issues/9 and https://github.com/ESX-Org/es_extended/blob/master/es_extended.sql

For those having this issue, copy and paste this into your SQL:

`
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET NAMES utf8 /;
/
!50503 SET NAMES utf8mb4 /;
/
!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 /;
/
!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=‘NO_AUTO_VALUE_ON_ZERO’ */;

– Dumping database structure for essentialmode
CREATE DATABASE IF NOT EXISTS essentialmode /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
USE essentialmode;

– Dumping structure for table essentialmode.users
CREATE TABLE IF NOT EXISTS users (
identifier varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
license varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
money int(11) DEFAULT NULL,
name varchar(50) COLLATE utf8mb4_bin DEFAULT ‘’,
skin longtext COLLATE utf8mb4_bin,
job varchar(50) COLLATE utf8mb4_bin DEFAULT ‘unemployed’,
job_grade int(11) DEFAULT ‘0’,
loadout longtext COLLATE utf8mb4_bin,
position varchar(36) COLLATE utf8mb4_bin DEFAULT NULL,
bank int(11) DEFAULT NULL,
permission_level int(11) DEFAULT NULL,
group varchar(50) COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

– Data exporting was unselected.

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, ‘’) /;
/
!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) /;
/
!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
`

Everything should be fixed after this.

If you have the same problem then just install all the sql files to database, simply.

Thanks for not reading my post. No SQL file held anything to do with the table users.

Then I dont know, I was just trying to help. Sorry I didnt read

Essentialmode can be a bit confusing to setup but in the original post of the ES topic, it states:

Import the SQL file that comes with esplugin_mysql 

And that file creates the users table.

I thought so. It seems that the newer esplugin_mysql is updated to have fxmigrant though, and as a result, has deleted the sql file. fxmigrant is broken from my understanding on linux right now.

He’s bad about not updating the topic. As for the latest version, I’ve chosen not to follow any further updates of ES. We’re going to stick with 6.1 and alter it to fit our needs.

FXMigrant is the new way to properly do database migrations and updates for database schemas in FiveM. Please create a topic or suggestion asking for supporting FXMigrant on Linux. I’m afraid that’s all I can do.

I also do not recommend utilizing an older version of EssentialMode.