Pickanothername Posted December 19, 2021 Share Posted December 19, 2021 Error: https://imgur.com/JjjGaVl Hello, this error pops up in the login panel, but it does not provide the entire panel panel. Please correct any mistakes. Where is wrong code? c.lua function auth(username, password) if not username then responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A1]") return end if not password then responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A2]") return end local q = exports.["pystories-db"]:mysql_query("SELECT * FROM pystories_users WHERE login=? AND password=?", username, md5(password)) if #q > 1 then -- Znaleziono więcej niż 1 usera o podanej kombinacji loginu i hasła responseServerValue(source, "Błąd logowania. Kod błędu [ERR_A3]") elseif #q < 1 then -- Nie znaleziono żadnego usera o podanej kombinacji loginu i hasła responseServerValue(source, "Taki użytkownik nie istnieje") else -- Jest tylko jeden user! Hura! local player = source if not player then return end setElementData(player, "player:sid", q[1].sid) if string.len(q[1].imie) < 3 then triggerClientEvent(player, "openAcc", player) return end local pos = split(q[1].position, ",") spawnPlayer(player, pos[1], pos[2], pos[3], pos[4], q[1].skin, pos[5], pos[6]) setCameraTarget(player, player) setElementHealth(player, q[1].health) -- Tutaj reszta ladowania się setElementData(player, "user:imie", q[1].imie) setElementData(player, "user:nazwisko", q[1].nazwisko) setElementData(player, "user:plec", q[1].plec) triggerClientEvent(player, "destroyLogin", player) end end addEvent("auth", true) addEventHandler("auth", getRootElement(), auth) Link to comment
Moderators IIYAMA Posted December 19, 2021 Moderators Share Posted December 19, 2021 Double post to work around a topic lock. 1 Link to comment
Recommended Posts