mam taki oto blad w db3
WARNING: [skrypty]/v_noti/server/notifications_s.lua: Bad argument @ 'triggerClientEvent' [Expected string at agument 1, got nil]
function refreshingb(client)
-- Pobieramy UID gracza
local sid=getElementData(client,"player:sid")
if not sid then return end
-- Pobieramy wyniki
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE ownedPlayer=?", sid)
triggerClientEvent(client, "board:refresh", resourceRoot, result)
end
local noti = exports.v_noti
addEvent("board:new", true)
addEventHandler("board:new", resourceRoot, function(id,name,board,cost)
-- Pobieramy UID gracza
local sid=getElementData(client,"player:sid")
if not sid then return end
-- Sprawdzamy czy jest jeszcze w?a?cicielem
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND ownedPlayer=?", id, sid)
if #result < 0 then
noti:noti("Nie jeste? w?a?cicielem tego pojazdu.", client)
return
end
local query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET plateText=? WHERE id=? AND ownedPlayer=?", board, id, sid)
if query then
takePlayerMoney(client, cost)
noti:noti("Pomy?lnie zmieniono,\ntablic? rejestracyjn? pojazdowi:\n"..name.." (ID: "..id..") na: "..board.."", client)
refreshingb(client)
end
end)
addEvent("board:download", true)
addEventHandler("board:download", resourceRoot, refreshingb)
Kod kt?ry poda?e? jest od notyfikacji? Je?li nie to wklej go tutaj i wska? t? konkretn? linijk? z b??dem.
W b??dzie masz wyra?nie napisane ?e w triggerClientEvent w pierwszym argumencie oczekiwano stringu (tekstu) a otrzymano nic.
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach