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

Wysłany: 2018-05-20, 20:38


AkossPL







Wiek: 25
Na forum: 4080 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

mam problem wszystko dobrze robi? i nie mog? si? po?onczy?

--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]

-- Settings
DBHandler=nil
DBName="xxx"
DBUser="xxx"
DBPass="xxx"
DBHost="xxx"

-- Functions
function dbSet(...)
    if not {...} then return end
    local stringe=dbPrepareString(DBHandler,...)
    local query=dbExec(DBHandlerstringe)
    return query
end

function dbGet(...)
    if not {...} then return end
    local stringe=dbPrepareString(DBHandler,...)
    local query=dbQuery(DBHandlerstringe)
    local result,num_affected_rowslast_insert_id =dbPoll(query, -1)
    return result
end


addEventHandler("onResourceStart"resourceRoot, function()
    DBHandler=dbConnect("mysql""dbname="..DBName..";host="..DBHost..""DBUserDBPass"share=1;autoreconnect=1")
    if DBHandler then
        outputDebugString("* Po??czono pomy?lnie! (MySQL)")
        dbSet("SET NAMES utf8")
    else
        outputDebugString("* Brak po??czenia! (MySQL)")
    end
end)


local SQL_LOGIN="xxx"
local SQL_PASSWD="xxx"
local SQL_DB="xxx"
local SQL_HOST="xxx"
local SQL_PORT=3306

local root getRootElement()

local SQL

local function connect()
    SQL mysql_connect(SQL_HOSTSQL_LOGINSQL_PASSWDSQL_DBSQL_PORT)
    if (not SQLthen
        outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
    else
        mysql_query(SQL,"SET NAMES utf8")
        --outputServerLog("Modul mysql polaczony!")
    end

end


local function keepAlive()
    if (not mysql_ping(SQL)) then
        outputServerLog("Zerwane polaczenie z baza danych, nawiazywanie...")
        connect()
    end
end
addEventHandler("onResourceStart",getResourceRootElement(),function()
    connect()
    setTimer(keepAlive300000)
end)

function esc(value)
    return mysql_escape_string(SQL,value)
end

function pobierzTabeleWynikow(query)
    local result=mysql_query(SQL,query)
    if (not resultthen
        outputDebugString("mysql_query failed: (" .. mysql_errno(SQL) .. ") " .. mysql_error(SQL))
        outputServerLog("mysql_query failed: (" .. mysql_errno(SQL) .. ") " .. mysql_error(SQL))
        return nil
    end
    local tabela={}
    for result,row in mysql_rows_assoc(result) do
        table.insert(tabela,row)
    end
    mysql_free_result(result)
    return tabela
end

function q(sQuery, ...)
    local qHandler=dbQuery(CDatabase.hConsQuery, ...)
    local resultiRowssError=dbPoll(qHandler90)
    if result==nil then
        resultiRowssError=dbPoll(qHandler, -1)
        if result==nil then
            dbFree(qHandler)
            outputDebugString('Max query runtime reached: ' ..sQuery.. '|' ..iRows.. '|' ..sError)
            return false
        end
    end
    if result==false then
        outputDebugString('Error executing query: ' ..sQuery.. '|' ..iRows.. '|' ..sError)
        return false
    end
    return resultiRows, (sError or '-')
end

function pobierzWyniki(query)
    local result=mysql_query(SQL,query)
    if (not resultthen return nil end
    row mysql_fetch_assoc(result)
    mysql_free_result(result)
    return row
end


function zapytanie(query)
    local result=mysql_query(SQL,query)
    if (resultthen mysql_free_result(result) return true end
    return
end

function insertID()
    return mysql_insert_id(SQL)
end

function affectedRows()
    return mysql_affected_rows(SQL)
end


function fetchRows(query)
    local result=mysql_query(SQL,query)
    if (not resultthen return nil end
    local tabela={}

    while true do
        local row mysql_fetch_row(result)
        if (not rowthen break end
        table.insert(tabela,row)
    end
    mysql_free_result(result)
    return tabela
end


function getSQLLink()
    return SQL
end



tutaj b??dy w konsoli


[New WorldV3]/[BAZA]/ogrpg-db/s_db.lua:27: dbPoll failed; Ta
ble 'db_33192.ogrpg_jobs' doesn't exist


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-20, 20:58


DaVeCS

Mapper






Wiek: 31
Na forum: 3386 dni
Posty: 193
Nick w MP: DaVe

Piwa: 59

Respekt: 70,5

Wed?ug b??du to nie posiadasz tabeli ogrpg_jobs

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-20, 21:03


AkossPL







Wiek: 25
Na forum: 4080 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

To wiesz jak to zrobi? bo ja tak za bardzo to nie wiem

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-20, 21:30


Maksasior

B)






Wiek: 24
Na forum: 3581 dni
Posty: 47
Nick w MP: tomals0n

Piwa: 34

Respekt: 101
Respekt: 101

Pobierz nowe ogrpg_jobs

Podpis
--Szatan:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-20, 21:41


AkossPL







Wiek: 25
Na forum: 4080 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

a sk?d mam to wsi??? ogrpg_jobs

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-20, 22:09


Maksasior

B)






Wiek: 24
Na forum: 3581 dni
Posty: 47
Nick w MP: tomals0n

Piwa: 34

Respekt: 101
Respekt: 101

AkossPL, we? jak?? paczke pobierz i b?dzie mie? pewnie xd

Podpis
--Szatan:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-20, 22:10


AkossPL







Wiek: 25
Na forum: 4080 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

robi?em ju? tak i dalej nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-05-21, 15:47


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

"Maksasior" napisał/a:

Pobierz nowe ogrpg_jobs

xDDDDDDDDD
Jak tabeli nie ma w mysql to po co ma pobiera? nowy skrypt?
Ju? pomog?em na pw

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: mogę :: się :: połączyć :: mysql
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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