[Release-Archived] Cops FiveM

Error loading script server.lua in resource police: server.lua:1: attempt to call a nil value (global ‘require’)

Someone help me? please?

Use the latest version?

Should be … :smiley:

Well, it’s not… Since the latest version doesn’t have a require in server.lua: https://github.com/Kyominii/Cops_FiveM/blob/master/police/server/server.lua

1 Like

Its still saying that.

@Yunus_Emre_AKTAS : /copadd

@editlxrd : Please update to the latest version (like said @Havoc). If you still in trouble, I recommand you to join the discord server (link in OP)

Hey, your package ain’t working for me, getting a lot of errors who seem to make no sense at all…

Error parsing script server.lua in resource banking: server.lua:47: function arguments expected near ‘)’
IGNORE - (DispatchSystem) [11/15/2017 11:43:48]: Setting TCP connection IP to 0.0.0.0
IGNORE - (DispatchSystem) [11/15/2017 11:43:48]: TCP Created, Attempting to start
Failed to load script server.lua.
IGNORE - (DispatchSystem) [11/15/2017 11:43:48]: TCP Started, Listening for connections…
Started resource banking
Error loading script server.lua in resource vdk_inventory: server.lua:1: attempt to call a nil value (global ‘require’)
stack traceback:
server.lua:1: in main chunk
Failed to load script server.lua.
Started resource vdk_inventory
Error loading script server.lua in resource vdk_recolt: server.lua:1: attempt to call a nil value (global ‘require’)
stack traceback:
server.lua:1: in main chunk
Failed to load script server.lua.
Started resource vdk_recolt
Error loading script server.lua in resource police: server.lua:1: attempt to call a nil value (global ‘require’)
stack traceback:

Update to the latest version… This is the same issue as @editlxrd

All you need to do is download the latest version from the GitHub: https://github.com/Kyominii/Cops_FiveM

thanks for quick reply, will do that right now

it fixed it for resource police, banking & inventory still face the same odd error for some reason

Error parsing script server.lua in resource banking: server.lua:47: function arguments expected near ‘)’
Failed to load script server.lua.
Started resource banking
Error loading script server.lua in resource vdk_inventory: server.lua:1: attempt to call a nil value (global ‘require’)
stack traceback:
server.lua:1: in main chunk
Failed to load script server.lua.
Started resource vdk_inventory
Error loading script server.lua in resource vdk_recolt: server.lua:1: attempt to call a nil value (global ‘require’)
stack traceback:
server.lua:1: in main chunk
Failed to load script server.lua.

Different resources, not the place to ask. Instead, ask in the threads for said resources. Make sure you’re using the latest version and they’ve been updated to work with FXServer. If not, then you can either 1) ask the devs to port them over or 2) not use these resources anymore.

figured this guy would maybe know 2, as he reuploaded them in a comment making his ‘setup’ available, but thanks will do

new delicious error… getting pretty tiered of this (yes i do have the correct username, password, host, and has all required permissions (my essentialmode works just fine):

[ERROR] [MySQL] An error happens on MySQL for query “SELECT * FROM user_vehicle WHERE identifier=@identifier {@identifier=steam:110000104b0a222}”: Access denied for user ‘fivemdb’@‘localhost’ (using password: YES)
[ERROR] [MySQL] An error happens on MySQL for query “SELECT rank FROM police WHERE identifier = ‘steam:110000104b0a222’ {@identifier=steam:110000104b0a222}”: Access denied for user ‘fivemdb’@‘localhost’ (using password: YES)

p.s. using /copadd to add clients also replies with “unkown command /copadd”

It seems that your credentials aren’t correct like you said according to the error : “Access denied for user ‘fivemdb’@‘localhost’ (using password: YES)”. Check your sql server, make sure the user “fivemdb” has the correct permissions for the tables “user_vehicle” and “police” (essential probably uses other tables)

And you have to use /copadd in the chat (CopAdd is for RCON but only since 1.4.1 which is a beta version)

What? CouchDB is a document storage and is not the same as SQL… You’re either using SQL or CouchDB (or both, if essential allows it) but you should not be sending SQL queries to CouchDB.

where do i add “Add sql file in your database” ?

and since it is connecting using credentials for my couchdb, where am i supposed to change these ? (non found in config file or server file…

SQL and DB is quite confusing and after 1,5/2 years im still struggling with it a lot…

i’m using couchdb and sql plugin (mysql-async) + essqlplugin)

@Qpanther You’re going to need an SQL database server. I personally use MySQL. The SQL file would be opened in MySQL workbench and executed on a database/schema that’s been manually created on the server. You’ll also need to set up a user that has permissions to access that database and then put it’s credentials and the name of the database in the config for this resource.

@Kyominii Is there any plans on making a non-SQL version that stores the information in a text file? Might be handy for those who run small servers that are either whitelisted or won’t have more than 10 people added to the cop whitelist. Of course I guess the downside to making such a thing would be people who don’t understand SQL might use the text version for large servers…

By the way, the cop-only blips seem to be broken by Mello Trainer’s player blip toggle. Is there a possibility for a compatibility patch of some kind? Or would you recommend another Trainer?

@Kyominii
Hi, I wanted to ask you a question:
The menus before were not like today. There was a subtract …
Do you have the script with these menus like that in FX?

will do that, thank you for your reply