Electrosumm Posted August 24, 2015 Share Posted August 24, 2015 function bejelentkezes () local felhasznalonev = guiGetText(felhedit) local jelszo = guiGetText(jeledit) if (felhasznalonev:match("^%s*$")) then outputChatBox("A felhasználónév rublika üres!Kérlek írd be a felhasználóneved!",255,0,0,true) elseif (jelszo:match("^%s*$")) then outputChatBox("A jelszo rublika üres!Kérlek írd be a jelszavad!",255,0,0,true) else outputChatBox("Logging in...",0,255,0,true) triggerServerEvent("onFelhasznaloBejelentkezes",getLocalPlayer,felhasznalonev,jelszo) then end end for this debugscript say unexpected symbol near "then" when i delete "then" debug say type then before end so what? local db_host = "localhost" local db_username = "" local db_password = "" local db_table = "blbalbalba" local db_port = "3306" local connection = false function connect() connection = dbConnect("mysql","dbname="..db_table..";host="..db_host..";port="..db_port..,db_username,db_password) if (connection) then outputConsole("A szerver sikeresen csatlakozott az adatbázishoz.",1) return true else outputConsole("Nemsikerült csatlakozni az adatbázishoz újrapróbálás 5 másodperc múlva...",1) setTimer(connect,5000,1) end end addEventHandler("onResourceStart",resourceRoot,connect) debug say unexpected symbol near "," line 9 Link to comment
JR10 Posted August 24, 2015 Share Posted August 24, 2015 This should be easy for you to fix. local db_host = "localhost" local db_username = "" local db_password = "" local db_table = "blbalbalba" local db_port = "3306" local connection = false function connect() connection = dbConnect("mysql","dbname="..db_table..";host="..db_host..";port="..db_port,db_username,db_password) if (connection) then outputConsole("A szerver sikeresen csatlakozott az adatbázishoz.",1) return true else outputConsole("Nemsikerült csatlakozni az adatbázishoz újrapróbálás 5 másodperc múlva...",1) setTimer(connect,5000,1) end end addEventHandler("onResourceStart",resourceRoot,connect) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now