Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2020-11-26, 22:16


NoNamik







Wiek: 35
Na forum: 2186 dni
Posty: 289
Nick w MP: JestemNoNamem

Piwa: 374

Respekt: 60

mam taki oto blad w db3
WARNING: [skrypty]/v_noti/server/notifications_s.lua: Bad argument @ 'triggerClientEvent' [Expected string at agument 1, got nil]

a o to kod

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"resourceRootresult)
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=?"idsid)
    if #result < 0 then 
        noti:noti("Nie jeste? w?a?cicielem tego pojazdu."player)
        return
    end
    local query=exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET plateText=? WHERE id=? AND ownedPlayer=?"boardidsid)
    if query then
        takePlayerMoney(clientcost)
        noti:noti("Pomy?lnie zmieniono,\ntablic? rejestracyjn? pojazdowi:\n"..name.." (ID: "..id..") na: "..board..""player)
        refreshingb(client)
    end
end)

addEvent("board:download"true)
addEventHandler("board:download"resourceRootrefreshingb)



noti:noti("Pomy?lnie zmieniono,\ntablic? rejestracyjn? pojazdowi:\n"..name.." (ID: "..id..") na: "..board..""player)

chodzi mi o ta linijke

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-11-27, 02:33


Adaskokieblasko







Wiek: 23
Na forum: 2954 dni
Posty: 101

Piwa: 18

Respekt: 100
Respekt: 100

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"resourceRootresult)
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=?"idsid)
    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=?"boardidsid)
    if query then
        takePlayerMoney(clientcost)
        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"resourceRootrefreshingb)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-11-27, 08:13


Szypki_exe







Wiek: 21
Na forum: 3239 dni
Posty: 172

Piwa: 1426

Respekt: 150
Respekt: 150Respekt: 150

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.

Postaw piwo autorowi tego posta
 

 
Tagi: notyfikacja :: stronie :: servera
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Odpowiedz do tematu

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
Dodaj temat do Ulubionych
Wersja do druku