Also add what you already tried so far.

Error resuming coroutine: server/player/login.lua:76: attempt to index a nil value (global ‘db’)
stack traceback:
server/player/login.lua:76: in function ‘registerUser’
server/main.lua:115: in function <server/main.lua:103>
Error running system event handling function for resource LockSystem: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/server.lua:27: bad argument #1 to ‘for iterator’ (table expected, got number)
stack traceback:
[C]: in for iterator ‘for iterator’
server/server.lua:27: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:195: in function citizen:/scripting/lua/scheduler.lua:194
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:194: in function citizen:/scripting/lua/scheduler.lua:158

Hello, this is a friendly reminder because this is your first time creating a topic (or it has been a while since your last topic) in this category.

Please note that most of the support is provided by the FiveM community on a voluntary basis. We ask you to be patient; there is no guarantee we have a solution to your problem(s). To avoid unnecessary/duplicate topics, please browse the forums before creating a topic.

To improve your chances of your issue(s) being solved, please provide as much information as possible about the issue(s) you are having. Also —whenever possible— please use the template given to you when creating a topic.

Thanks for keeping these forums tidy!
:mascot:

okay well on line 76 of server/player/login.lua there is a value “db” that the script is trying to call that doesn’t exist. This means

  1. The script is written wrong.
  2. The Database information is incorrect assuming db stands for a sql connection string
  3. The script can’t connect to the database.

Thanks for the answer, I do not know so well with the connect. Would be glad to help

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