Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: trybi
1. Nie trybi skrypt na łączenie z bazą danych
Cze??, mam problem ze skryptem na ??czenie si? z baz? danych, a mianowicie:

[19-04-09 09:51:32] WARNING: [EMS]/DB/sql9384571.lua:31: dbPoll failed; Unknown column 'exp' in 'field list'
[19-04-09 09:51:38] WARNING: [EMS]/DB/sql9384571.lua:31: dbPoll failed; Unknown column 'exp' in 'field list' [DUP x2]

Skrypt:

[lua]
--[[

Interfejs obs?ugi bazy danych - nak?adka na funkcje db...

]]--

local root = getRootElement()

local SQL


local function connect()
SQL = dbConnect("mysql", "dbname=*******;host=137.74.0.12;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) ------------ LINIJKA 31
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...
2. gui nie trybi
Witam po wpisaniu komendy /taxi gui powinno sie ukaza? a tak sie nie dzieje. Jakie? pomys?y jak to naprawi?? Skrypt wczytuje si? bez problemu.


[code]function gui()
local wezwanie = guiCreateWindow(558, 127, 545, 419, "Wezwania Frakcyjne", false)
guiWindowSetSizable(wezwanie, false)
showCursor ( true )

progressbar[1] = guiCreateProgressBar(15, 29, 201, 65, false, wezwanie)
guiProgressBarSetProgress(progressbar[1], 16)
gridlist[1] = guiCreateGridList(17, 40, 115, 53, false, wezwanie)
label[1] = guiCreateLabel(8, 36, 552, 504, "", false, wezwanie)
combobox[1] = guiCreateComboBox(18, 25, 59, 31, "", false, wezwanie)
radiobutton[1] = guiCreateRadioButton(164, 193, 350, 187, "", false, wezwanie)
guiRadioButtonSetSelected(radiobutton[1], true)
checkbox[1] = guiCreateCheckBox(21, 36, 78, 73, "", false, false, wezwanie)
memo[1] = guiCreateMemo(10, 34, 151, 301, "", false, wezwanie)
guiMemoSetReadOnly(memo[1], true)
memo[2] = guiCreateMemo(222, 34, 309, 301, "", false, wezwanie)
guiMemoSetReadOnly(memo[2], true)
buttonPJ = guiCreateButton(430, 343, 101, 24, "Przyjmij", false, wezwanie)
buttonZK = guiCreateButton(245, 343, 101, 24, "Zako?cz", false, wezwanie)
buttonZM = guiCreateButton(458, 385, 73, 24, "Zamknij", false, wezwanie)
gridlist[2] = guiCreateGridList(173, 146, 39, 31, false, wezwanie)
checkbox[2] = guiCreateCheckBox(9, 394, 70, 15, &...