Jump to content

unexpected symbol (help)


Electrosumm

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...