kanersps / es_admin

GNU Affero General Public License v3.0
26 stars 32 forks source link

SCRIPT ERROR: @es_admin2/server.lua:302: attempt to index a nil value (local 'user') #23

Open FoxyLoli opened 4 years ago

FoxyLoli commented 4 years ago

freshly installed.

cfx> setgroup 1 superadmin
SCRIPT ERROR: @es_admin2/server.lua:302: attempt to index a nil value (local 'user')
> ref (@es_admin2/server.lua:302)
> handler (@essentialmode/server/player/login.lua:134)
> ref (@es_admin2/server.lua:301)
> handler (@essentialmode/server/classes/groups.lua:141)
> ref (@es_admin2/server.lua:298)
cfx> Sending heartbeat to live-internal.fivem.net:30110
SCRIPT ERROR: @es_admin2/server.lua:125: attempt to index a nil value (upvalue 'user')
> ref (@es_admin2/server.lua:125)
> handler (@essentialmode/server/player/login.lua:134)
> ref (@es_admin2/server.lua:124)
> handler (@essentialmode/server/player/login.lua:134)
> handler (@es_admin2/server.lua:123)
SCRIPT ERROR: @es_admin2/server.lua:176: attempt to index a nil value (local 'user')
> ref (@es_admin2/server.lua:176)
> handler (@essentialmode/server/player/login.lua:134)
> handler (@es_admin2/server.lua:175)

Update: A Little update so you can see my server.cfg

`# Only change the IP if you're using a server with multiple network interfaces, otherwise change the port only.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# Essentials Important Permission
add_ace resource.essentialmode command.sets allow
add_ace resource.essentialmode command.add_principal allow
add_ace resource.essentialmode command.add_ace allow
set es_enableCustomData 1
set mysql_connection_string "server=149.56.80.31;uid=root;password=####;database=essentialmode"

# These resources will start by default.
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
ensure scoreboard

# Essentials
start mysql-async
#start esplugin_mysql
start essentialmode
start es_admin2
start es_ui

# ESX

# This allows players to use scripthook-based plugins such as the legacy Lambda Menu.
# Set this to 1 to allow scripthook. Do note that this does _not_ guarantee players won't be able to use external plugins.
sv_scriptHookAllowed 1

# Uncomment this and set a password to enable RCON. Make sure to change the password - it should look like rcon_password "YOURPASSWORD"
rcon_password "######"

# A comma-separated list of tags for your server.
# For example:
# - sets tags "drifting, cars, racing"
# Or:
# - sets tags "roleplay, military, tanks"
sets tags "default"

# A valid locale identifier for your server's primary language.
# For example "en-US", "fr-CA", "nl-NL", "de-DE", "en-GB", "pt-BR"
sets locale "en-GB" 
# please DO replace root-AQ on the line ABOVE with a real language! :)

# Set an optional server info and connecting banner image url.
# Size doesn't matter, any banner sized image will be fine.
#sets banner_detail "https://url.to/image.png"
#sets banner_connecting "https://url.to/image.png"

# Set your server's hostname
sv_hostname "[EU] Nexus Clus "

# Nested configs!
#exec server_internal.cfg

# Loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars which can be used in scripts
set temp_convar "hey world!"

# Uncomment this line if you do not want your server to be listed in the server browser.
# Do not edit it if you *do* want your server listed.
#sv_master1 ""

# Hide player endpoints in external log output.
sv_endpointprivacy true

# Server player slot limit (must be between 1 and 32, unless using OneSync)
sv_maxclients 32

# Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey)
# -> replace "" with the key
set steam_webApiKey "#key"

# License key for your server (https://keymaster.fivem.net)
sv_licenseKey #key `
Tezract commented 4 years ago

Also having this same issue! Would appreciate any help with it.

jafuente commented 4 years ago

and where does the steamid request the es_admin? it would be a matter of modifying that part

Kretena1 commented 4 years ago

I stumbled upon this thread at least 10 times when I searched for my issue. The error is that es_extended ditched essentialmode so you don't need both of them now.

Mucroce commented 4 years ago

So what is the fix?

Vhit3 commented 4 years ago

Anyone know how to fix it?

kanersps commented 4 years ago

Could you tell me what version of EM you are using?

Also could you check if your database is properly filled

On Thu, 16 Apr 2020 at 07:08, Vhit3 notifications@github.com wrote:

Anyone know how to fix it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kanersps/es_admin/issues/23#issuecomment-614418630, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC52CD3FSLOIOUCQBKJJ7RTRM2HEDANCNFSM4KZUYS4A .

HumanTree92 commented 4 years ago

Well the simple fix is to not use this anymore unless you can edit this to work with the new ESX.

Vhit3 commented 4 years ago

I fin only one version of this and i use xampp data base so i think its working

kanersps commented 4 years ago

I advise using https://github.com/zap-fivem/esx/ instead of the usual ESX by Hawaii_Beach. Due to ongoing harassment, insults and threats from him, he also decided to forcefully stop base FiveM resources and has shown great distaste into helping the FiveM community.

On Thu, 16 Apr 2020 at 11:56, Vhit3 notifications@github.com wrote:

I fin only one version of this and i use xampp data base so i think its working

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kanersps/es_admin/issues/23#issuecomment-614544657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC52CD3ME2LIZJMXVKH2N6DRM3I5NANCNFSM4KZUYS4A .

Vhit3 commented 4 years ago

these are server files or what? bcs im using fivem files, essentialmode, esadmin2 mySQL and Async and everything is working but command setgroup 1 superadmin dont want to work

Vhit3 commented 4 years ago

im new in this and im trying to make this server properly but when i see error i dont know what can i do with this

kanersps commented 4 years ago

Can you give me a picture of how your database looks

WantToLearnCoding commented 4 years ago

Is this fixed? Or still fixing it?

kanersps commented 4 years ago

Is this fixed? Or still fixing it?

There can be many causes, if you have this as well, could you post your database layout?

WantToLearnCoding commented 4 years ago

I dont know if this one is the fix but it fixed mine. I just changed the dependency to fxmigrant since I put both es_extended and essentialmode. Im still confused if it good to add both or just es_extended cause it has the basic needs to tap in to your database but im just adding essentialmode to make es_admin work.

kanersps commented 4 years ago

Soon I’m releasing a very advanced admin script called ModMin without any dependencies. It also has a modern and very good UI. 🙂

WantToLearnCoding commented 4 years ago

Consider me one of the early users after release. ^_^

prettyflako1705 commented 4 years ago

want it @kanersps seems like OMG!!!!!

PRONIIX27 commented 4 years ago

Soon I’m releasing a very advanced admin script called ModMin without any dependencies. It also has a modern and very good UI. 🙂

I really want you to create the admin menu, I have the es_extended and I can't find any that works well for my server, thank you very much!!

BaksaBarnus commented 3 years ago

I'm still having this porblem. I can't put myself into superadmin. In heidisql there is no permission level tab.

LangusMcgee commented 3 years ago

how do I alter the users table so that there is a permissions collum I did this

ALTER TABLE users ADD COLUMN permission_level;

I do not have much experience with making SQL files. thx for reading