Hali! Az a problémám, hogy van egy resource, ami az alábbi hibát írja, de nem jövök rá hogy mi lehet a gond. Légyszíves valaki segítsen!
Log:
[2016-01-12 18:36:49] SCRIPT ERROR: a_login\\server.lua:40: unexpected symbol near \')\'
[2016-01-12 18:36:49] ERROR: Loading script failed: a_login\\server.lua:40: unexpected symbol near \')\'
[2016-01-12 18:36:50] Querying MTA master server... success! (Auto detected IP:31.46.171.52)
[2016-01-12 18:36:50] Server started and is ready to accept connections!
[2016-01-12 18:36:50] To stop the server, type \'shutdown\' or press Ctrl-C
[2016-01-12 18:36:50] Type \'help\' for a list of commands.
Script:
function playerRegister(player, username, password, password2)
local md5password = md5(password)
if(password~=password2)then
triggerClientEvent(\"info\",player,\"A felhasználónév túl rövid!\", \"red\")
return
end
if(string.len(username)<5)then
triggerClientEvent(\"info\",player,\"A felhasználónév túl rövid!\", \"red\")
return
end
if(string.len(password)<5)then
triggerClientEvent(\"info\", player, \"A jelszó túl rövid!\", \"red\")
return
end
serial = getPlayerSerial(player)
dbQuery = function(qh, player, username, md5password)
local a, b, c = dbPoll(qh, 0)
if b > 0 then
outputChatBox(\"Neked már van accountod\")
regisztalhat = false
return
end
end, {player,username,md5password}, mysql:getConnection(), (\"SELECT * FROM characters WHERE charactername=\'\" .. safecharname .. \"\' AND account=\'\" .. mysql:escape_string(id) .. \"\' AND cked = 0\")
dbQuery = function(qh, player, username, md5password)
local result, rows, errorMsg = dbPoll(qh, 0)
if not regisztalhat then return end
if rows > 0 then
exports.a_box:addNotification(\"Ez a felhasználónév már foglalt!\",\"red\")
else
local _, id = mysql:query_free(\"INSERT INTO accounts SET serial = \'\".. serial ..\"\', username = \'\"..tostring(username)..\"\', password = \'\"..tostring(md5password)..\"\'\", true)
exports.a_box:addNotification(\"Sikeresen regisztráltál!\",\"green\")
end
-40-es sor end, {player,username,md5password}, mysql:getConnection(), \"SELECT * FROM accounts WHERE username = ? LIMIT 1\", username)
end
addEvent(\"playerRegister\", true)
addEventHandler(\"playerRegister\", getRootElement(), playerRegister)