Posiadam vps z mintsa Prob?wa?em ju? ka?dego spos?b po przez instalowanie apt-get install libmysqlclient16 w katalogu z serwer i /usr/lib
z tego co wiem w mintsie nie instaluj? tych pakiet?w.
Mimo tego wyskakuje nadal
[15:14] Loading plugin: mysql.so
[15:14] Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
[15:14] Error: Function not registered: 'mysql_query'
[15:14] Error: Function not registered: 'mysql_store_result'
[15:14] Error: Function not registered: 'mysql_fetch_row_format'
[15:14] Error: Function not registered: 'mysql_free_result'
[15:14] Error: Function not registered: 'mysql_ping'
[15:14] Error: Function not registered: 'mysql_reconnect'
[15:14] Error: Function not registered: 'mysql_connect'
[15:14] Script[gamemodes/IRG.amx]: Run time error 19: "File or function is not
ERROR: Could not load /home/data/drag0n/470265.mta/x64/./dbconmy.so - libmysqlclient.so.16: cannot open shared object file: No such file or directory[2015-08-19 15] ERROR: cool-db/s_db.lua:30: dbConnect failed; Could not connect
-- Functions
function dbSet(...)
if not {...} then return end
local query=dbExec(DBHandler, ...)
return query
end
function dbGet(...)
if not {...} then return end
local query=dbQuery(DBHandler, ...)
local result=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)
Wiec chodzi o to, ?e mam zainstalowane xyzzyrp ale chcia?bym usun?? te po??czenie kt?re mia?o by? z baz? MySQL. Po prostu logowanie nie reaguje.
Czy kto? wie jak to przerobi? aby mo?na by?o si? normalnie logowa? bez po??czenia z Baz? MySQL ?
error 017: undefined symbol "Query"
error 017: undefined symbol "Query"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
format(Query,sizeof(Query),"SELECT * FROM `Users` WHERE `Username` = '%s' AND `Password` = '%s'",GetPName(playerid),EscapedText);
Witam.
Mam taki problem czy baza mysql si? nie ?aczy z serwerem czy b?ad serwera. Oto b??dy z serwera:[2015-06-22 19:11] Type 'help' for a list of commands.
[2015-06-22 19:11] To stop the server, type 'shutdown' or press Ctrl-C
[2015-06-22 19:11] Server started and is ready to accept connections!
[2015-06-22 19:11] Querying MTA master server... success! (Auto detected IP:188.68.249.130)
[2015-06-22 19:11] Server minclientversion is now 1.4.1-9.07241
[2015-06-22 19:11] ERROR: PumaComp/c_cars_s.lua:81: attempt to call global 'mysql_query' (a nil value)
[2015-06-22 19:11] ERROR: PumaComp/c_domy_s.lua:4: attempt to call global 'mysql_query' (a nil value)
[2015-06-22 19:11] ERROR: PumaComp/c_dataBase_s.lua:3: attempt to call global 'mysql_connect' (a nil value)
[2015-06-22 19:11] ERROR: PumaComp c_regulamin_c.lua is invalid. Please re-compile at http://luac.mtasa.com/
[2015-06-22 19:11] ERROR: PumaComp c_panelSzefa_c.lua is invalid. Please re-compile at http://luac.mtasa.com/
[2015-06-22 19:11] ERROR: PumaComp c_taxi_c.lua is invalid. Please re-compile at http://luac.mtasa.com/
[2015-06-22 19:11] ERROR: PumaComp c_frakcje_c.lua is invalid. Please re-compile at http://luac.mtasa.com/
[2015-06-22 19:11] ERROR: PumaComp c_pomoc_c.lua is invalid. Please re-compile at http://luac.mtasa.com/
[2015-06-22 19:11] ERROR: PumaComp c_salon_c.lua is invalid. Please re-compile at http://luac.mtasa.com/
[2015-06-22 19:11] ERROR: PumaComp c_domy_c.lua is invalid. Please re-compile ...
Prosz? ?eby kto? zrobi? tak ?ebym tylko musia? uzupe?ni? dane do bazy tutaj daje kod.
[code]function saveallvehicles(modelID)
executeSQLDropTable ( "vehiclesaver" )
executeSQLCreateTable ( "vehiclesaver", "VehicleID INTEGER, px REAL, py REAL, pz REAL, rx REAL, ry REAL, rz REAL, Color1 INTEGER, Color2 INTEGER, Health REAL, upgrades TEXT, paintjob INTEGER, Hood INTEGER, Trunk INTEGER, FrontLeft INTEGER, FrontRight INTEGER,RearLeft INEGER, RearRight INEGER, FrontLeftPanel INTEGER, FrontRightPanel Integer, RearLeftPanel Integer, RearRightPanel Integer,Windscreen Integer,FrontBumper Integer, RearBumper Integer,FLL Integer,FRL Integer,RLL Integer, RRL Integer, VehOvL Integer, HR Real,TR Real,FLR Real,FRR Real, RLR Real, RRR Real,WFL Integer, WRL Intger, WFR Integer, WRR Integer, VehSirena Integer, EngineState Integer, XTUR Real, YTUR Real" )
local vehicles = (getElementsByType("vehicle"))
for i, vehicle in pairs (vehicles) do
local id = (getElementModel(vehicle))
if id == 602 or id == 545 or id == 496 or id == 517 or id == 401 or id == 410 or id == 518 or id == 600 or id == 527 or id == 436
or id == 589 or id == 580 or id == 419 or id == 439 or id == 533 or id == 549 or id == 526 or id == 491 or id == 474 or id == 445
or id == 467 or id == 604 or id == 426 or id == 507 or id == 547 or id == 585 or id == 405 or id == 587 or id == 409 or id == 466
or id == 550 or id == 492 or id == 566 or id == 546 or id == 540 o...
Witam mam do was pytanie jaki mi polecicie pluglin MySql ?
Od: StrickenKid czy BlueG ?
I z k?d je pobra? bo na forum sampa w ich g??wnych tematach u BlueG linki wygas?y jaki? error a StrickenKid jaka? stron? StrickenKid.com mi wywala i tam nic nie ma.
Witam, chcia?abym si? dowiedzie? jaka jest r??nica mi?dzy mysql_close a mysql_free_result? kiedy u?y? tego a kiedy tego, ja u?ywam ca?y czas mysql_close, ale to chyba b??d..
Witam posiadam maszyn? VPS, i podczas uruchomiania serwera wyskakuj? b??dy
Dodatkowo dodam, ?e je?eli serwer stoi na hostingu np servhost, to wszystko jest w porz?dku.
Logi
[code][/spoiler]
[10:11:20] Loaded.
[10:11:20] Loading plugin: crashdetect.so
[10:11:20] CrashDetect v4.13.1 is OK.
[10:11:20] Loaded.
[10:11:20] Loading plugin: mysql.so
[10:11:20] Failed (plugins/mysql.so: cannot open shared object file: No such file or directory)
[10:11:20] Loading plugin: sscanf.so
[10:11:20]
Cze??, Panowie kieruj? pytanie do tych co pracowali ju? na bazie danych MySQL. Nie oczekuj? odpowiedzi typu "spr?buj tak mo?e b?dzie dzia?a?" tylko konkretnych rozwi?za?.
Ot?? - spotkali?cie si? kiedy? z owym problemem, ?e po zgraniu warto?ci do tabeli o rodzaju FLOAT ( powinna by? 0.0 ) ustawia?o wam tam jedn? liczb? bez kropki?
Witam, ostatnio zacz??em bawi? si? baz? MySQL, chcia?em zrobi? skrypt na banowanie zaczynaj?c od tej funkcji, lecz ju? na pocz?tek co? nie dzia?a :v
connection = dbConnect ( "mysql", "dbname=--;host=--;port=--", "--", "--", "--" )
function jezeliZbanowanyJoin(plr) serial = getPlayerSerial(source) local query = string.format("select * FROM bany WHERE serial="..serial) dbQuery(connection, query)
if query then
outputChatBox("jeste? zbanowany", source) end
end
addEventHandler ( "onPlayerJoin", getRootElement(), jezeliZbanowanyJoin)
Witam mam logowanie mysql
?
Zrobi?em taki kod aczkolwiek mam nadal ten sam problem, pobiera informacje z nieba oto kod do funkcji Wczytaj Konto jak i do ca?ego panelu
[code]stock WczytajKonto(playerid)
{
new
s_buf[128];
//format(s_buf, 512, "SELECT uid, skin, cash, plec, wiek, posx, posy, posz, posa, HP, VW, Int, SpawnType, admin FROM gracze WHERE name='%s' LIMIT 1;", NickName(playerid) );
format(s_buf, sizeof(s_buf), "SELECT * FROM `gracze` WHERE `name` = '%s' LIMIT 1;", NickName(playerid));
mysql_query(s_buf);
mysql_store_result();
if(mysql_fetch_row(s_buf, "|"))
{
sscanf(s_buf, "p<|>ds[32]ddddfffffdddd",
PlayerInfo[playerid][uid],
PlayerInfo[playerid][name],
PlayerInfo[playerid][skin],
PlayerInfo[playerid][cash],
PlayerInfo[playerid][plec],
PlayerInfo[playerid][wiek],
PlayerInfo[playerid][posx],
PlayerInfo[playerid][posy],
PlayerInfo[playerid][posz],
PlayerInfo[playerid][posa],
PlayerInfo[playerid][HP],
PlayerInfo[playerid][VW],
PlayerInfo[playerid][Int],
PlayerInfo[playerid][SpawnType],
PlayerInfo[playerid][ADMIN]);
}
mysql_free_result();
}
[/code]
A oto logowanie z dialogid
[code]if(dialogid == D_LOGIN)
{
new string[512];
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_INPUT, "["GAMEMODENAME"] Logowanie", "Witaj, aby zalogowa? si? na naszym serw...
Witam.
Dzi? znalaz?em pewien skrypt na prywatne auta, lecz po zmienieniu jego na baz? MySQL i chc?c po??czy? go, w "debugscript" wyskakuje nast?puj?cy b??d:
ERROR: prywatne/skrypt.lua:9: dbConnect failed; Not valid type INFO: SKRYPT: Failed to connect to database.
Witajcie, znacie poprawne zastosowanie zapytania dbExec?
Chodzi mi o zastosowanie aby mo?na by?o wci?gn?? np opis ze stringem, jak dodaje rzeczy kt?re maj? np kropki lub przecinki w sobie to ju? b??dy si? wywalaj?.
dbExec(connection, "UPDATE hp_vehicles SET model='?', loc='?,?,?' WHERE id='1'", model, x,y,z)
w?a?nie przez lokalizacj? pojazdu te b??dy si? pokazuj?, a z modelu ju? nie, mo?na to jako? naprawi??
Witam, w jaki spos?b mog? odj?? jedn? liczb? od kt?rej kt?ra jest w bazie danych poprzez zapytanie, zrobi?em takie co? ale to nie spe?nia moich wymaga?, bo nie odejmuje liczby.
addEvent("onUrzadDataUpdate", true) addEventHandler("onUrzadDataUpdate", resourceRoot, function(miejsca, id) local ile = 0
if miejsca == true then
local ile = ile + 1
local zapytanie = string.format("UPDATE go_urzadprace SET miejsca='%d' WHERE id_frakcji='%d'", ile,id) dbExec(handler, zapytanie)
elseif miejsca == false then
local ile = ile - 1
local zapytanie = string.format("UPDATE go_urzadprace SET miejsca='%d' WHERE id_frakcji='%d'", ile, id) dbExec(handler, zapytanie) end
end)
Witajcie mam problem z tym kodzikiem mianowicie podczas pobierania pojazd?w nadaje setElementData na 2 i niestety kiedy wsiadam do pojazdu o id innym ni? 2 to zmienia si? pozycja pojazdu o id 2
function pobierz(theVehicle) local result = mysql_query ( database ,"SELECT * FROM `pg_vehicles`")
---- outputChatBox("[1]")
if result then -- outputChatBox("[2]")
while true do
-- outputChatBox("[3]") local row = mysql_fetch_assoc(result)
-- outputChatBox("[4]")
if not row then break end
outputChatBox("[Debug]Pobiera Rekordy") local v = createVehicle(row.model,row.x,row.y,row.z) setElementData(v,"id",row.id)
end
end
end
function zapisz(theVehicle) local x,y,z = getElementPosition( theVehicle ) outputChatBox("[1]") outputChatBox("X"..x.."Y"..y.."Z"..z) outputChatBox("[2]") local result = mysql_query(database,"SELECT * FROM `pg_vehicles` ") local row = mysql_fetch_assoc(result) outputChatBox("[3]") res = mysql_query ( database, "UPDATE `pg_vehicles` SET `x` = " ..x.. ", `y` = " ..y.. ", `z` = " ..z.. " WHERE `id` = "..getElementData(theVehicle,"id").." ") outputChatBox("[4]")
Witam pisze skrypt na prywatne pojazdy z wykorzystaniem mysql lecz nie moge sobie poradzi? z zapisem pozycji pojazdu kiedy z niego wyjdziemy/wyjdziemy z servera prosi? bym o rady jak co? takiego napisa?
function pobierz() local result = mysql_query ( database ,"SELECT * FROM `pg_vehicles`")
-- outputChatBox("[1]")
if result then -- outputChatBox("[2]")
while true do
-- outputChatBox("[3]") local row = mysql_fetch_assoc(result)
-- outputChatBox("[4]")
if not row then break end
outputChatBox("[Debug]Pobiera Rekordy") pojazd = createVehicle(row.model,row.x,row.y,row.z)
-- setElementData(pojazd, "id", row.id)
Witajcie mam problem z zapisywaniem danych konta kiedy doda?em zapisywanie loginu przesta?o dodawa? dane do mysql
w strukturze mysql mam oczywi?cie login
function saveAccounts () -- Save in the database
local account = getPlayerAccount ( source ) local login = getAccountName (account) local serial = getPlayerSerial ( source ) local x,y,z = getElementPosition( source ) local i = getElementInterior( source ) local d = getElementDimension( source ) local skin = getPedSkin ( source ) local money = getPlayerMoney ( source ) local health = getElementHealth ( source ) local armor = getPedArmor ( source ) local wanted = getPlayerWantedLevel ( source ) local q = mysql_query(database,"SELECT * FROM `accounts` WHERE `serial` = '".. serial .."'")
if(mysql_num_rows(q) == 0) then
mysql_query( database, "INSERT INTO accounts ( `serial`,login , x, y, z, intterior, demension, skin, money, health, armor, wanted ) VALUES ( '" .. serial .. "',"..login..", " .. x .. ", " .. y .. ", " .. z .. "," .. i .. ", " .. d .. "," .. skin .. "," .. money .. ", ".. health ..", ".. armor ..", " .. wanted .. ")" )