Tematy otagowane jako: popsuło
1. db popsuło się
Witam,mam taki problem z baz? danych.
Wyskakuje mi taki o to b??d i nie wiem jak go naprawi?,pr?bowa?em wszystkiego. ale nic nie dzia?a
Kod skryptu:
Kod: -- Settings
DBHandler=nil
DBName=""
DBUser=""
DBPass=""
DBHost=""
-- Functions
-- Functions
function dbSet(...)
if not {...} then return end
local qh = dbQuery(DBHandler, ...)
if not qh then return false end
local result, num_affected_rows, last_insert_id = dbPoll(qh, -1)
return result, num_affected_rows, last_insert_id
end
function dbGet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...)
local query=dbQuery(DBHandler, stringe)
local result,num_affected_rows, last_insert_id =dbPoll(query, -1)
return result
end
addEventHandler("onResourceStart", resourceRoot, function()
DBHandler=dbConnect("mysql", "dbname="..DBName..";host="..DBHost.."", DBUser, DBPass, "share=1")
if DBHandler then
outputDebugString("* Connect to server MYSQL...")
else
outputDebugString("* No Connecting to server MYSQL..")
end
end)
Za pomoc daje zmine !
Dzi?ki
2. Cos sie popsuło
Ot?? napisa?em prosty skrypt na swiatla kolorowe montowanie pod gui i teraz nie wiem co ?le robie ale sie nie montuj?! Prosz? zwr?cic uwage na ostatni? funkcje
[code]
GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(431, 144, 411, 309, "Zmiana koloru swiate?", false)
guiWindowSetSizable(GUIEditor.window[1], false)
GUIEditor.button[1] = guiCreateButton(27, 34, 109, 73, "Bia?e - 500 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
GUIEditor.button[2] = guiCreateButton(154, 34, 109, 73, "Zielone - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00FF00")
GUIEditor.button[3] = guiCreateButton(279, 34, 109, 73, "Niebieskie - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF")
GUIEditor.button[4] = guiCreateButton(27, 123, 109, 73, "Czerwone - 70000 PLN", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFF0000")
GUIEditor.button[5] = guiCreateButton(27, 123, 109, 73, "Czerwone - 70000 PLN", false, GUIEditor.window[1])
...