Hellow,
At the outset, sorry for any mistakes, but I am using google translator.
Getting to the bottom of it, I get this message five minutes after clicking "Zapisz"
Could anyone tell me what I'm doing wrong? I am a novice scriptwriter. I leave the content of the script below.
button = {}
Notatki = {}
DBName="realrp"
DBUser="root"
DBPass=""
DBHost="localhost"
function pobieranie_danych()
local DBHandler=dbConnect("mysql", "dbname="..DBName..";host="..DBHost.."", DBUser, DBPass, "share=1")
local zapisz = dbQuery (DBHandler, "INSERT INTO notatki(ID,tresc) VALUES(?,?)", 1, Notatki.Okno )
end
function otworz_notatki()
showCursor(true, true)
GUI = guiCreateWindow(0.80, 0.70, 0.19, 0.25, "Notatki służbowe", true)
guiWindowSetSizable(GUI, false)
Zamknij = guiCreateButton(10, 27, 114, 24, "Zamknij", false, GUI)
Notatki.Okno = guiCreateMemo(10, 51, 241, 132, "", false, GUI)
Zapisz2 = guiCreateButton(134, 27, 112, 24, "Zapisz", false, GUI)
addEventHandler("onClientGUIClick", Zapisz2, pobieranie_danych, false)
addEventHandler("onClientGUIClick", Zamknij, zamknij_notatki, false)
end
function zamknij_notatki()
showCursor (false, true)
guiSetVisible(GUI, false)
end
addCommandHandler("nsluzbowa", otworz_notatki)