Wysłany: 2019-01-26, 16:24
szeroki
BlueRP.pl Zapraszam GTA5
Wiek: 36 Na forum: 3876 dni Posty: 104
Piwa : 9
siemka mam Takim Problem Mam Serwer Mta Na vps Oraz Baze ale nie mog? sie po??czyc niewiem co jest -mysql/server.lua:12: Bad argument @ 'dbQuery' [Expected
Kod: function polacz()
mysql = dbConnect("mysql", "dbname=NazwaBazy;host=localhost", "......", "Haslowdupeczaslo", "share=1")
if not mysql then
outputDebugString("Nieudalo polaczyc sie z baza danych.")
else
outputDebugString("Udalo polaczyc sie z baza danych.")
end
end
addEventHandler("onResourceStart", resourceRoot, polacz)
function wykonaj(...)
local qh = dbQuery(mysql, ...)
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
[18:22] Resources: 257 loaded, 1 failed
[18:23] WARNING: [glowne]/VN-mysql/server.lua:12: Bad argument @ 'dbQuery' [Expected
db-connection at argument 1, got boolean]
[18:23] WARNING: [glowne]/VN-mysql/server.lua:12: Bad argument @ 'dbQuery' [Expected
db-connection at argument 1, got boolean] [DUP x2]
[18:23] ERROR: [glowne]/VN-logowanie/server.lua:58: attempt to get length of local 's
pr' (a boolean value)
[18:23] WARNING: [glowne]/VN-mysql/server.lua:12: Bad argument @ 'dbQuery' [Expected
db-connection at argument 1, got boolean]
[18:23] ERROR: [glowne]/np-logowanie/server.lua:13: attempt to get length of local 's
pr' (a boolean value)
[18:24] WARNING: [glowne]/VN-mysql/server.lua:12: Bad argument @ 'dbQuery' [Expected
db-connection at argument 1, got boolean]
Podpis
**⚡┃CyanRP┃⚡ **
**💻┃*Adres IP:*** *wyspa.cyanrp.pl*
**📱┃*Link do serwera discord:*** *https://discord.gg/MJKqHksanU
Wysłany: 2019-01-26, 16:59
Adis.exe
LUA Developer
Wiek: 23 Na forum: 3498 dni Posty: 292
Nick w MP: Adiś.exe
Piwa : 997
local dbsuccess = nil
local dbname = "nazwa_db"
local dbhost = "host_db"
local dbusername = "nazwa_usera_db"
local dbpassword = "haslo_db"
addEventHandler ( "onResourceStart" , resourceRoot , function()
dbsuccess = dbConnect ( "mysql" , "dbname=" .. dbname .. ";host=" .. dbhost .. "" , dbusername , dbpassword , "share=1;autoreconnect=1" )
if dbsuccess then
outputDebugString ( "Po??czono z baz? danych" )
else
outputDebugString ( "Brak po??czenia z baz? danych" )
end
end )
function wykonaj (...)
if not {...} then return end
local stringe = dbPrepareString ( dbsuccess , ...)
local query = dbQuery ( dbsuccess , stringe )
local result = dbPoll ( query , - 1 )
return result
end
Podpis
KONTAKT:
GG: 60968224
Discord: Adiś.exe#3828
Użytkownik : 05.11.2016
GTAO Member : 20.02.2019
Support-Team : 25.07.2018
Support-Team : 19.01.2019
Test Mod : 08.02.2019
Wysłany: 2019-01-26, 17:25
szeroki
BlueRP.pl Zapraszam GTA5
Wiek: 36 Na forum: 3876 dni Posty: 104
Piwa : 9
ok sprawdze
Lipa
Kod: [19] WARNING: Script '[glowne]/VN-mysql/server.lua' is not encoded in UTF-
8. Loading as ANSI...
[19] SCRIPT ERROR: [glowne]/VN-mysql/server.lua:1: unexpected symbol near
'?'
[19] ERROR: Loading script failed: [glowne]/VN-mysql/server.lua:1: unexpec
ted symbol near '?'
[ Dodano : 2019-01-27, 01:00 ]
nie loczy sie dalej
[ Dodano : 2019-01-28, 13:12 ]
Temat do zamkniecia udalo mi sie samemu to zrobic
Podpis
**⚡┃CyanRP┃⚡ **
**💻┃*Adres IP:*** *wyspa.cyanrp.pl*
**📱┃*Link do serwera discord:*** *https://discord.gg/MJKqHksanU
Ostatnio zmieniony przez DsJ3 2019-01-28, 07:03, w całości zmieniany 1 raz
Tagi: jak :: podłączyć :: serwer :: pod :: mysql :: vps
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: