cloud3_gg
Wiek: 26 Na forum: 1852 dni Posty: 2
Cze??! Chcia?em sobie przetestowa? GM EmStories ale mam problemy z panelem logowania, a ot??:
Rejestruje si? niby wszystko ok, pokazuje si? ?e niby zarejestrowalem sie poprawnie a w konsoli b??d
Kod:
exports: Call to non-running server resource (DB) [string "?"]
Kod po??czenia DB
Kod:
--[[
Interfejs obs?ugi bazy danych - nak?adka na funkcje db...
]]--
local root = getRootElement()
local SQL
--[[
Dane s? ju? uzupelnione tylko zamienione pod wzg. bezpiecze?stwa
]]--
local function connect()
SQL = dbConnect("mysql", "dbname=fb;host=;port=3306", "","","share=0")
if (not SQL) then
outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
else
zapytanie("SET NAMES utf8")
end
end
addEventHandler("onResourceStart",resourceRoot, connect)
function pobierzTabeleWynikow(...)
local h=dbQuery(SQL,...)
if (not h) then
return nil
end
local rows = dbPoll(h, -1)
return rows
end
function pobierzWyniki(...)
local h=dbQuery(SQL,...)
if (not h) then
return nil
end
local rows = dbPoll(h, -1)
if not rows then return nil end
return rows[1]
end
function zapytanie(...)
local h=dbQuery(SQL,...)
local result,numrows=dbPoll(h,-1)
return numrows
end
function nullCallback(qh)
dbFree(qh)
end
function szybkieZapytanie(...)
local h=dbQuery(nullCallback,SQL,...)
end
function insertID()
local r=pobierzWyniki("select last_insert_id() lid")
return r.lid
end
--[[
function affectedRows()
return mysql_affected_rows(SQL)
end
]]--
function fetchRows(query)
local result=mysql_query(SQL,query)
if (not result) then return nil end
local tabela={}
while true do
local row = mysql_fetch_row(result)
if (not row) then break end
table.insert(tabela,row)
end
mysql_free_result(result)
return tabela
end
-- left for compatibility
function esc(s)
return string.gsub(s,"['\"\\]","")
end
W lua jestem zielony wiec prosze o pomoc
Link do LUA logowania:
https://www40.zippyshare.com/v/TWud1Ps3/file.html
serdeczne dzi?ki je?li komu? si? uda rozwi?za?
daje
mi?ego dnia