Need help with a script error


#1

Just started out with a server that I made. Got some scripts added into the server and everything works great. One problem that we are having at this point is that whenever we try to use es_admin an error pops up. One example of this is that whenever I try to use a command such as /kick or /announce the error pops up. This also happens when using the home menu. Any help would be great as I’ve looked for a while for a fix but everyone seems to focus on economy based problems.
The error is:
Error running call reference function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:351: server/main.lua:218: attempt to index a nil value (field ‘?’)
stack traceback:
server/main.lua:218: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:337: in function citizen:/scripting/lua/scheduler.lua:336
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:336: in function citizen:/scripting/lua/scheduler.lua:335
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:351: in function citizen:/scripting/lua/scheduler.lua:322


#2

Well, show us the script or part of it which is causing this problem.


#3

the script is essentials with the admin portion of it


#4

I do not use it, nor I know the code by heart.


#5

Any information I could give that could help with a solution?


#6

Yeah, give me the link to the file or at least paste some of the code including the line that is causing this error to happen.


#7

I could give the link to essential mode, I cant give the code because I don’t know what is causing it. All I know of is that the error.


#8

Here is the link to the script


#9

The problem is that in the code that I’ve downloaded from this forum thread there is no such resource called es_admin, although there is es_admin2. You have mentioned that you are using es_admin.


#10

yes es_admin2 is what Im referring too, sorry.


#11

server/main.lua:218

either groups or Users variables are null (nil)

Not sure why would they be null, did you set up everything correctly when installing this resource? Did you follow the documentation and what not? I’d advise you to post in essentialmode forum thread or their discord in order to get help with such problem.


#12

I would believe i set it up correctly as Ive watched multiple tutorials and looked at the documentation for it.


#13

Please do not create new topics for support/questions related to existing resources.

Only ask questions or request support in the original resource topic, or on whatever site/page you got the resource from (for example: create an issue on the GitHub page of the resource that you downloaded).

That way the original resource creator will get a notification and be able to help properly. This also helps to reduce duplicate topics of the same issue, because everything will be inside the original topic, allowing everyone to see all issues and solutions in one place.

Thanks for keeping the forums tidy.
:mascot:


#14