25.02.2010, 05:02
Quote:
Originally Posted by Seif_
Quote:
|
You need to have libmysql.dll where the server.exe folder, in server.cfg, add mysq.dll to the plugins line, and into the plugins folder, add the mysql.dll file.
Originally Posted by Seif_
Quote:
|
Originally Posted by MenaceX^
Quote:
You need to have libmysql.dll where the server.exe folder, in server.cfg, add mysq.dll to the plugins line, and into the plugins folder, add the mysql.dll file. |
Originally Posted by Seif_
Quote:
Quote:
|
[01:23:16] CMySQLHandler::Query(UPDATE players SET MiserPerk=0,PainPerk=0,TraderPerk=0,Tutorial=1,Mission=0,Warnings=0,Adjustable=1,FactionSpawn=1 WHERE id=405,resultID) - Threaded query with id 5 started. (Extra ID: -1) [01:23:16] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [01:23:16] CMySQLHandler::ProcessQueryThread(UPDATE players SET PlayerLevel=3,Banned=0,WantedLevel=0,AdminLevel=1339,HelperLevel=1338,DonateRank=0,UpgradePoints=0,ConnectedTime=50,Registered=1,Sex=1,Age=23,Logged=0,CK=0,Muted=0,Disabled=0,Respect=50,Money=92190 WHERE id=405, Resultid: 5) - An error has occured in your query. (MySQL server has gone away)) [01:23:16] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [01:23:16] CMySQLHandler::ProcessQueryThread(UPDATE players SET Bank=50668,Crimes=0,Kills=0,Deaths=3,pillsTime=0,Arrested=0,WantedDeaths=0,Phonebook=0,LottoNr=0,Fishes=0,BiggestFish=0,Job=16,Paycheck=5172,HeadValue=0,Jailed=0,JailTime=0,Materials=0,Drugs=0 WHERE id=405, Resultid: 5) - An error has occured in your query. (MySQL server has gone away)) [01:23:16] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [01:23:16] CMySQLHandler::ProcessQueryThread(UPDATE players SET Leader=0,Member=0,FMember=255,Rank=0,Chara=264,ContractTime=25,DetSkill=0,SexSkill=0,BoxSkill=0,LawSkill=0,MechSkill=0,JackSkill=0,CarSkill=0,NewsSkill=0,DrugsSkill=0,CookSkill=0,FishSkill=0 WHERE id=405, Resultid: 5) - An error has occured in your query. (MySQL server has gone away)) [01:23:16] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [01:23:16] CMySQLHandler::ProcessQueryThread(UPDATE players SET pSHealth='25.000000',Team=3,Model=203,PhoneNr=6633,House=255,Bizz=255,CarLic=1,FlyLic=1,BoatLic=1,FishLic=0,GunLic=0,CarTime=0,PayDay=6,PayDayHad=0,Wins=0,Loses=0,AlcoholPerk=0,DrugPerk=0 WHERE id=405, Resultid: 5) - An error has occured in your query. (MySQL server has gone away)) [01:23:16] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [01:23:16] CMySQLHandler::ProcessQueryThread(UPDATE players SET MiserPerk=0,PainPerk=0,TraderPerk=0,Tutorial=1,Mission=0,Warnings=0,Adjustable=1,FactionSpawn=1 WHERE id=405, Resultid: 5) - An error has occured in your query. (MySQL server has gone away))
Originally Posted by Sma_X
Hi, as far as I've seen there's a problem with mysql_free_result();
If you use it twice, it crashes the server. |
[07:20:25] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [07:20:25] CMySQLHandler::ProcessQueryThread(SELECT id FROM players WHERE LOWER(Name) = LOWER('foreverStrong') LIMIT 1, Resultid: 1) - An error has occured in your query. (MySQL server has gone away)) [07:20:35] >> mysql_real_escape_string( Connection handle: 1 )
[07:20:38] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [07:20:38] CMySQLHandler::Ping() - An error has occured (MySQL server has gone away, Error ID: 2006) [07:20:38] CMySQLHandler::Connect() - Connection was successful. [07:20:54] >> mysql_reconnect( Connection handle: 1 ) [07:20:54] CMySQLHandler::Ping() - An error has occured (Commands out of sync; you can't run this command now, Error ID: 2014) [07:20:54] CMySQLHandler::Ping() - An error has occured (Commands out of sync; you can't run this command now, Error ID: 2014) [07:20:54] CMySQLHandler::Connect() - Connection was successful. [07:21:10] >> mysql_reconnect( Connection handle: 1 ) [07:21:10] CMySQLHandler::Ping() - An error has occured (Commands out of sync; you can't run this command now, Error ID: 2014) [07:21:10] CMySQLHandler::Ping() - An error has occured (Commands out of sync; you can't run this command now, Error ID: 2014) [07:21:10] CMySQLHandler::Connect() - Connection was successful. [07:21:26] >> mysql_reconnect( Connection handle: 1 ) [07:21:26] CMySQLHandler::Ping() - An error has occured (Commands out of sync; you can't run this command now, Error ID: 2014) [07:21:26] CMySQLHandler::Ping() - An error has occured (Commands out of sync; you can't run this command now, Error ID: 2014) [07:21:26] CMySQLHandler::Connect() - Connection was successful.
root@lvps1:/var/games/samp/default/mysql_plugin-R3-src_final_2/MySQL_VS# make gcc -c -O3 -w -DLINUX -Wall -I../SDK/amx/ ../SDK/amx/*.c g++ -c -O3 -w -DLINUX -Wall -I../SDK/amx/ ../SDK/*.cpp g++ -c -O3 -w -DLINUX -Wall -I../SDK/amx/ main.cpp g++ -c -O3 -w -DLINUX -Wall -I../SDK/amx/ source/*.cpp g++ -O2 -fshort-wchar -shared -o "../mysql.so" *.o ./mysql_lib/libmysqlclient.a -lpthread /usr/bin/ld: CAmxString.o: relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC CAmxString.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [all] Error 1
[23:51:51] Server Plugins [23:51:51] -------------- [23:51:51] Loading plugin: mysql.so [23:51:51] Failed (plugins/mysql.so: wrong ELF class: ELFCLASS64) [23:51:51] Loaded 0 plugins.
mysql_fetch_field_row(Rank1, "fRank1"); DynamicFactions[idx][fRank1] = Rank1; mysql_fetch_field_row(Rank2, "fRank2"); DynamicFactions[idx][fRank2] = Rank2; mysql_fetch_field_row(Rank3, "fRank3"); DynamicFactions[idx][fRank3] = Rank3; mysql_fetch_field_row(Rank4, "fRank4"); DynamicFactions[idx][fRank4] = Rank4;
Rank1[35],Rank2[35],Rank3[35]
[01:14:40] CMySQLHandler::FetchField("fRank1") - test1 [01:14:40] >> mysql_fetch_field_row( Connection handle: 1 ) [01:14:40] CMySQLHandler::FetchField("fRank2") - test2 [01:14:40] >> mysql_fetch_field_row( Connection handle: 1 ) [01:14:40] CMySQLHandler::FetchField("fRank3") - [01:14:40] >> mysql_fetch_field_row( Connection handle: 1 ) [01:14:40] CMySQLHandler::FetchField("fRank4") - test4
Originally Posted by TuNeFisH
search function doesn't find this, so i try getting help here:
Trying to compile the R3-2 source code on ubuntu 8.04.4 x86_64: (cuz the precompiled x86 doesn't seem 2 b working on 64bit linux) Код:
root@lvps1:/var/games/samp/default/mysql_plugin-R3-src_final_2/MySQL_VS# make gcc -c -O3 -w -DLINUX -Wall -I../SDK/amx/ ../SDK/amx/*.c g++ -c -O3 -w -DLINUX -Wall -I../SDK/amx/ ../SDK/*.cpp g++ -c -O3 -w -DLINUX -Wall -I../SDK/amx/ main.cpp g++ -c -O3 -w -DLINUX -Wall -I../SDK/amx/ source/*.cpp g++ -O2 -fshort-wchar -shared -o "../mysql.so" *.o ./mysql_lib/libmysqlclient.a -lpthread /usr/bin/ld: CAmxString.o: relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC CAmxString.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [all] Error 1 any idea? ----------------------------------------- edit: ok, i tried a differerent way. - used the other makefile of the source package. - made a space between "-L" and "/usr" ;P - removed flag "-lmysqlclient_r" - compile ran without errors "yay \o/" i thought at first, but.... Код:
[23:51:51] Server Plugins [23:51:51] -------------- [23:51:51] Loading plugin: mysql.so [23:51:51] Failed (plugins/mysql.so: wrong ELF class: ELFCLASS64) [23:51:51] Loaded 0 plugins. |
$(GPP) -O2 -fshort-wchar -shared -o $(OUTFILE) *.o -L/usr/lib/mysql -lmysqlclient_r -lpthread
$(GPP) -O2 -fshort-wchar -shared -o $(OUTFILE) *.o -L/usr/local/lib/mysql -lmysqlclient_r -lpthread
UNLOADED
[00:35:22] --------------------------- [00:35:22] MySQL Debugging activated (04/22/10) [00:35:22] --------------------------- [00:35:22] [00:35:22] >> mysql_connect( ) [00:35:22] CMySQLHandler::CMySQLHandler() - constructor called. [00:35:22] -- Connecting to "*.*.*.*" | DB: "***" | Username: "***" ... [00:35:22] CMySQLHandler::Connect() - Connection was successful. [00:37:13] >> mysql_close( Connection handle: 1 ) [00:37:13] CMySQLHandler::Disconnect() - Connection was closed. [00:37:25] [00:37:25] --------------------------- [00:37:25] MySQL Debugging activated (04/22/10) [00:37:25] --------------------------- [00:37:25] [00:37:25] >> mysql_connect( )
SA-MP Server: 0.3a R7 Exception At Address: 0x77436FD1 Registers: EAX: 0x02840000 EBX: 0x00000C7D ECX: 0x028424C8 EDX: 0x028424C8 ESI: 0x028424C0 EDI: 0x00000000 EBP: 0x0012E1A0 ESP: 0x0012E0C8 EFLAGS: 0x00010202 Stack: +0000: 0x768D01A4 0x02840000 0x00000000 0x00000000 +0010: 0x02840148 0x0012E1C0 0x774371AA 0x774371E6 +0020: 0x768D01C4 0x02840000 0x71000C7D 0x0284024C +0030: 0x0012E038 0x02840148 0x02840148 0x028424C8 +0040: 0x00000003 0xFFFFFFFE 0x0000007F 0x00000000 +0050: 0x00000000 0x00000020 0x01BB9510 0x0012E204 +0060: 0x00000003 0x00000000 0xE70000E7 0x0284F8B0 +0070: 0x00000000 0xE70000E7 0x00000000 0x00000000 +0080: 0x71000C7D 0x00000000 0x00000001 0x0284F8B0 +0090: 0x028424C8 0x028400C4 0x00000002 0x00000000 +00A0: 0x01BB9518 0x028400C4 0x00000001 0x00000000 +00B0: 0x00000801 0x0100000C 0x02840000 0x01840BC8 +00C0: 0x0012E0C8 0x0012DCE0 0x0012E244 0x773D99FA +00D0: 0x01DDAE14 0x00000000 0x0012E218 0x77436E0C +00E0: 0x00004000 0x00004008 0x028424C0 0x00004000 +00F0: 0x00004000 0x00000002 0x774371E6 0x77436E0C +0100: 0x000000C4 0x000000D0 0x02840BC0 0x000000C4 +0110: 0x000000C4 0x00000194 0x00203490 0x0012E268 +0120: 0x00000194 0x01C309F0 0x00000000 0xE70F1AA0 +0130: 0x11CFAB8B 0x8000A38C 0x92A1485F 0x75F92FAD
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3a R7, ©2005-2010 SA-MP Team [00:35:22] [00:35:22] Server Plugins [00:35:22] -------------- [00:35:22] Loading plugin: sscanf [00:35:22] [00:35:22] =============================== [00:35:22] sscanf plugin loaded. [00:35:22] © 2009 Alex "Y_Less" Cole [00:35:22] =============================== [00:35:22] Loaded. [00:35:22] Loading plugin: streamer [00:35:22] *** Streamer Plugin v2.3.7 by Incognito loaded *** [00:35:22] Loaded. [00:35:22] Loading plugin: mysql [00:35:22] > MySQL plugin R4 successfully loaded. [00:35:22] Loaded. [00:35:22] Loading plugin: Whirlpool [00:35:22] [00:35:22] ================== [00:35:22] [00:35:22] Whirlpool loaded [00:35:22] [00:35:22] ================== [00:35:22] [00:35:22] Loaded. [00:35:22] Loaded 4 plugins. [00:35:22] [00:35:22] Filter Scripts [00:35:22] --------------- [00:35:22] Loaded 0 filter scripts. [00:35:22] The server has been connected to the MySQL database! [00:35:22] [00:35:22] *--------------------------* [00:35:22] | Red's Stunt World v1.0 | [00:35:22] *--------------------------* [00:35:22] [00:35:22] Number of vehicle models: 0 [00:35:38] RCON admin connected to server. [00:36:40] RCON admin connected to server. [00:37:13] UNLOADED
plugins mysql sscanf
#include <a_mysql>
Originally Posted by $€ЯĢ
If you use VB10 package and plugin doesn't want to load (it throws out an error) use VB9 package.
|
Originally Posted by SAWC™
Since I installed the new version (R4) I'm having problems with my server.
It prints: Код:
UNLOADED |
-------------------------- SA-MP Server: 0.3a R7 Exception At Address: 0x02414C74 Registers: EAX: 0x00000060 EBX: 0x00000000 ECX: 0x00000001 EDX: 0x0158EEC8 ESI: 0x00000000 EDI: 0x00000000 EBP: 0x0289FF40 ESP: 0x0289FF34 EFLAGS: 0x00010202 Stack: +0000: 0x002B6672 0x00000060 0x0158EEC8 0x0289FF88 +0010: 0x002B5D0C 0x5D8B2853 0x00000000 0x00000000 +0020: 0x00000000 0x00000000 0x00000000 0x00000000 +0030: 0x00000000 0x00000000 0x00000000 0x00000000 +0040: 0x5D8B2853 0x00000000 0x0289FFC4 0x002B7978 +0050: 0xFFFFFFFF 0x0289FF94 0x7683D0E9 0x00000000 +0060: 0x0289FFD4 0x77CD19BB 0x00000000 0x7552A77D +0070: 0x00000000 0x00000000 0x00000000 0xC0000005 +0080: 0x7688FD89 0x7688FD89 0x0289FFA0 0x0289FB4C +0090: 0xFFFFFFFF 0x77C999FA 0x00151211 0x00000000 +00A0: 0x0289FFEC 0x77CD198E 0x002B5C30 0x00000000 +00B0: 0x00000000 0x00000000 0x00000000 0x00000000 +00C0: 0x002B5C30 0x00000000 0x00000000 0x49474542 +00D0: 0x4D48544E 0x00010006 0x00000007 0x9650FED7 +00E0: 0x01C9BA5E 0x000AF9D0 0x00000058 0x000000B8 +00F0: 0x000000D0 0x00000C0A 0x00000060 0x00010001 +0100: 0x00000058 0x00002E38 0x00002E90 0x00001728 +0110: 0x000045B8 0x00004718 0x00004698 0x000047E0 +0120: 0x00000000 0x003A0043 0x0057005C 0x006E0069 +0130: 0x006F0064 0x00730077 0x0072005C 0x00730065
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3a R7, ©2005-2010 SA-MP Team [12:58:58] [12:58:58] Server Plugins [12:58:58] -------------- [12:58:58] Loading plugin: sscanf [12:58:58] [12:58:58] =============================== [12:58:58] sscanf plugin loaded. [12:58:58] © 2009 Alex "Y_Less" Cole [12:58:58] =============================== [12:58:58] Loaded. [12:58:58] Loading plugin: streamer [12:58:58] *** Streamer Plugin v2.3.7 by Incognito loaded *** [12:58:58] Loaded. [12:58:58] Loading plugin: mysql [12:58:58] > MySQL plugin R4-2 successfully loaded. [12:58:58] Loaded. [12:58:58] Loading plugin: Whirlpool [12:58:58] [12:58:58] ================== [12:58:58] [12:58:58] Whirlpool loaded [12:58:58] [12:58:58] ================== [12:58:58] [12:58:58] Loaded. [12:58:58] Loaded 4 plugins. [12:58:58] [12:58:58] Filter Scripts [12:58:58] --------------- [12:58:58] Loaded 0 filter scripts. [12:58:58] The server has been connected to the MySQL database! [12:58:58] [12:58:58] *--------------------------* [12:58:58] | Red's Stunt World v1.0 | [12:58:58] *--------------------------* [12:58:58] [12:58:58] Number of vehicle models: 0 [12:59:09] RCON admin connected to server.
[12:58:58] [12:58:58] --------------------------- [12:58:58] MySQL Debugging activated (04/22/10) [12:58:58] --------------------------- [12:58:58] [12:58:58] >> mysql_connect( ) [12:58:58] CMySQLHandler::CMySQLHandler() - constructor called. [12:58:58] -- Connecting to "*.*.*.*" | DB: "blablabla" | Username: "blablabla" ... [12:58:58] CMySQLHandler::Connect() - Connection was successful. [12:59:12] >> mysql_close( Connection handle: 1 ) [12:59:12] CMySQLHandler::Disconnect() - Connection was closed. [12:59:12] CMySQLHandler::~CMySQLHandler() - deconstructor called. [12:59:12] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead) [12:59:12] CMySQLHandler::Disconnect() - You cannot call this function now. (Reason: Connection is dead)