Smarting

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Smarting

  • Rank
    I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.
  1. It has to be in the same file? or it can be in other file, cause in this file i did not find dbConnect. Can i ask you show some kinda example? How to make connection? And if in other file there is that connection, and if i add in other file same connection, is it slowing down server? Like example: In this code i add dbConnect with details, and in other file is the same dbConnect, is it going to slow down system.
  2. Hello everyone, i have a problem. I am not lua scripter, but somehow i managed to get trough some other errors, but this one is not understandable for me. addEvent("acc:onPlayerSubmit", true) addEventHandler("acc:onPlayerSubmit", getRootElement(), function(username, pass, op, remember, autologin, email) if client then local ip, serial = getPlayerIP(client), getPlayerSerial(client) if op == 0 then --Logging in dbQuery(handlePlayerLogin, {client, username, pass, ip, serial, remember, autologin}, connection, "SELECT * FROM `accounts` WHERE username = ?", username) elseif op == 1 then --Registering if isValidEmail(email) then dbQuery(handlePlayerRegister, {client, username, pass, email, ip, serial, remember}, connection, "SELECT username FROM `accounts` WHERE username = ? OR email = ?", username, email) else triggerClientEvent(client, "acc:onSubmitFail", client, "Disposable emails are not allowed. Please use another email provider.") end end end end) Error code : WARNING: account-manager/s_accounts.lua:209: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got nil] Thanks! :)