|
|
#2331 | ||
|
Little Clucker
![]() Join Date: Apr 2010
Posts: 25
Reputation: 1
|
Hello, i´ve changed my MYSQLplugin to MYSQL Plugin R6.
with windows samp server 0.3d ther is no problems. But with samp 0.3d RC2. I connect to server and if the first mysql_ called close the server the connection. Thats the parts they calld if a player connect... Code:
public OnPlayerConnect(playerid)
{
//ReconnectMySQL();
CheckMySQL();
GetPlayerName(playerid,PlayerName[playerid],MAX_PLAYER_NAME);
new namestring = strfind(PlayerName[playerid], "$", true); //what is plname?
checkban(playerid);
if(CheckAccountExists(playerid) == 0)
{
AccountExists[playerid] = 0;//nein
}
else if(CheckAccountExists(playerid) == 1)
{
AccountExists[playerid] = 1;//ja
}
PlayerCountry[playerid] = GetPlayerCountryName(playerid);
if(namestring != -1)
{
SendClientMessage(playerid, COLOR_RED, "Please remove the $ from your name!");
Kick(playerid);
return 1;
}
if(!IsPlayerNPC(playerid))
{
new connectstring[256];
format(connectstring, sizeof(connectstring), "* %s (%s) hat unseren Server betreten!", PlayerName[playerid], PlayerCountry[playerid]);
printf(connectstring);
SendClientMessageToAll(COLOR_GREY, connectstring);
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
SendClientMessage(playerid, COLOR_GREY, "\n");
}
...
}
Code:
public checkban(playerid)
{
new query[256],data[255],timestamp;
format(query,sizeof(query),"SELECT * FROM ban WHERE name = '%s'", PlayerName[playerid]);
mysql_query(query);
//mysql_format(1,query, "SELECT * FROM ban WHERE name = '%s'");
//mysql_function_query(1, query, false, "OnQueryFinish", "i", 1);
mysql_store_result();
if(mysql_num_rows())
{
mysql_get_field("dauer", data);
timestamp=strval(data);
if(mktime()<timestamp)
{
new zahl=timestamp-mktime();
zahl=zahl/60;
format(string,128,"SERVER: Du bist noch für %d Minuten gebannt",zahl);
SendClientMessage(playerid,COLOR_LIGHTRED,string);
GameTextForPlayer(playerid, "~b~Du bist: ~n~~r~gebannt", 600000, 3);
return Kick(playerid);
}
else
{
format(query,sizeof(query),"DELETE FROM ban WHERE name =' %s'", PlayerName[playerid]);
mysql_query(query);
//mysql_function_query(1, query, false, "OnQueryFinish", "i", 2);
}
}
mysql_free_result();
return 1;
}
Code:
public CheckAccountExists(playerid)
{
format(string, sizeof(string), "SELECT * FROM users WHERE name = '%s'", PlayerName[playerid]);
mysql_query(string);
mysql_store_result();
new value;
value = mysql_num_rows();
mysql_free_result();
return value;
}
Quote:
Quote:
|
||
|
|
|
|
|
#2332 |
|
Huge Clucker
![]() ![]() ![]() Join Date: May 2011
Location: = GetPlayerPos(WooTFTW);
Posts: 247
Reputation: 31
|
Code:
[02:23:43] ERROR Commands out of sync; you can't run this command now on query SELECT COUNT(*) FROM accounts [02:23:43] Commands out of sync for thread ID: -1 pawn Code:
|
|
|
|
|
|
#2333 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2011
Posts: 940
Reputation: 339
|
You should check any other queries that are executed prior to that for any possible unfreed memory.
Here's a common example: pawn Code:
|
|
|
|
|
|
#2334 |
|
Big Clucker
![]() ![]() Join Date: Aug 2009
Location: Liverpool uk
Posts: 111
Reputation: 9
|
cool
|
|
|
|
|
|
#2335 |
|
Big Clucker
![]() ![]() Join Date: Aug 2010
Location: The Netherlands
Posts: 109
Reputation: 15
|
Is anyone else experiencing random server crashes using R7 on Windows? (Without mysql_format())
|
|
|
|
|
|
#2336 |
|
Little Clucker
![]() Join Date: Jul 2010
Location: Poland, Warsaw
Posts: 7
Reputation: 0
|
I have some problem with version R7 on my Debian 6 x64
Plugin is loaded but after send any query i got server crash. Code:
*** buffer overflow detected ***: ./samp03svr terminated ======= Backtrace: ========= /lib32/libc.so.6(__fortify_fail+0x50)[0xf757ff80] /lib32/libc.so.6(+0xe1eba)[0xf757eeba] plugins/mysql.so(_ZN7Natives14n_mysql_formatEP6tagAMXPi+0x76f)[0xf749025f] ./samp03svr[0x80503e4] ./samp03svr[0x8051e85] ./samp03svr[0x80709ff] ./samp03svr[0x808127c] ./samp03svr[0x80ad6e1] ./samp03svr[0x80ad7d2] ./samp03svr[0x80b74c0] ./samp03svr[0x807d736] ./samp03svr[0x807d962] ./samp03svr[0x8077c23] /lib32/libc.so.6(__libc_start_main+0xe6)[0xf74b3ca6] ./samp03svr(__gxx_personality_v0+0xf5)[0x804b4c1] ======= Memory map: ======== 08048000-0816e000 r-xp 00000000 08:01 4572788 /home/d elavor/samp/samp03svr 0816e000-0818b000 rw-p 00125000 08:01 4572788 /home/d elavor/samp/samp03svr 0818b000-08195000 rw-p 00000000 00:00 0 09322000-09541000 rw-p 00000000 00:00 0 [heap] f5c33000-f6108000 rw-p 00000000 00:00 0 f6108000-f6109000 ---p 00000000 00:00 0 f6109000-f6a05000 rw-p 00000000 00:00 0 f6a05000-f6a11000 r-xp 00000000 08:01 4572791 /home/d elavor/samp/plugins/sscanf.so f6a11000-f6a12000 rw-p 0000c000 08:01 4572791 /home/d elavor/samp/plugins/sscanf.so f6a12000-f6a1c000 r-xp 00000000 08:01 6176771 /lib32/ libnss_files-2.11.3.so f6a1c000-f6a1d000 r--p 00009000 08:01 6176771 /lib32/ libnss_files-2.11.3.so f6a1d000-f6a1e000 rw-p 0000a000 08:01 6176771 /lib32/ libnss_files-2.11.3.so f6a1e000-f6a1f000 ---p 00000000 00:00 0 f6a1f000-f721f000 rw-p 00000000 00:00 0 f721f000-f7232000 r-xp 00000000 08:01 12176489 /usr/li b32/libz.so.1.2.3.4 f7232000-f7233000 rw-p 00013000 08:01 12176489 /usr/li b32/libz.so.1.2.3.4 f7233000-f7246000 r-xp 00000000 08:01 6176807 /lib32/ libnsl-2.11.3.so f7246000-f7247000 r--p 00012000 08:01 6176807 /lib32/ libnsl-2.11.3.so f7247000-f7248000 rw-p 00013000 08:01 6176807 /lib32/ libnsl-2.11.3.so f7248000-f724a000 rw-p 00000000 00:00 0 f724a000-f7253000 r-xp 00000000 08:01 6176811 /lib32/ libcrypt-2.11.3.so f7253000-f7254000 r--p 00008000 08:01 6176811 /lib32/ libcrypt-2.11.3.so f7254000-f7255000 rw-p 00009000 08:01 6176811 /lib32/ libcrypt-2.11.3.so f7255000-f727c000 rw-p 00000000 00:00 0 f727c000-f742f000 r-xp 00000000 08:01 12173325 /usr/li b32/libmysqlclient_r.so.16.0.0 f742f000-f7433000 r--p 001b2000 08:01 12173325 /usr/li b32/libmysqlclient_r.so.16.0.0 f7433000-f7478000 rw-p 001b6000 08:01 12173325 /usr/li b32/libmysqlclient_r.so.16.0.0 f7478000-f7479000 rw-p 00000000 00:00 0 f7482000-f7499000 r-xp 00000000 08:01 4572689 /home/d elavor/samp/plugins/mysql.so f7499000-f749a000 r--p 00017000 08:01 4572689 /home/d elavor/samp/plugins/mysql.so f749a000-f749b000 rw-p 00018000 08:01 4572689 /home/d elavor/samp/plugins/mysql.so f749b000-f749d000 rw-p 00000000 00:00 0 f749d000-f75dd000 r-xp 00000000 08:01 6176792 /lib32/ libc-2.11.3.so f75dd000-f75de000 ---p 00140000 08:01 6176792 /lib32/ libc-2.11.3.so f75de000-f75e0000 r--p 00140000 08:01 6176792 /lib32/ libc-2.11.3.so f75e0000-f75e1000 rw-p 00142000 08:01 6176792 /lib32/ libc-2.11.3.so f75e1000-f75e4000 rw-p 00000000 00:00 0 f75e4000-f7601000 r-xp 00000000 08:01 12176477 /usr/li b32/libgcc_s.so.1 f7601000-f7602000 rw-p 0001c000 08:01 12176477 /usr/li b32/libgcc_s.so.1 f7602000-f7626000 r-xp 00000000 08:01 6176823 /lib32/ libm-2.11.3.so f7626000-f7627000 r--p 00023000 08:01 6176823 /lib32/ libm-2.11.3.so f7627000-f7628000 rw-p 00024000 08:01 6176823 /lib32/ libm-2.11.3.so f7628000-f7711000 r-xp 00000000 08:01 11010070 /usr/li b32/libstdc++.so.6.0.13 f7711000-f7715000 r--p 000e9000 08:01 11010070 /usr/li b32/libstdc++.so.6.0.13 f7715000-f7716000 rw-p 000ed000 08:01 11010070 /usr/li b32/libstdc++.so.6.0.13 f7716000-f771e000 rw-p 00000000 00:00 0 f771e000-f7733000 r-xp 00000000 08:01 6176778 /lib32/ libpthread-2.11.3.so f7733000-f7734000 r--p 00014000 08:01 6176778 /lib32/ libpthread-2.11.3.so f7734000-f7735000 rw-p 00015000 08:01 6176778 /lib32/ libpthread-2.11.3.so f7735000-f7737000 rw-p 00000000 00:00 0 f7737000-f7739000 r-xp 00000000 08:01 6176822 /lib32/ libdl-2.11.3.so f7739000-f773a000 r--p 00001000 08:01 6176822 /lib32/ libdl-2.11.3.so f773a000-f773b000 rw-p 00002000 08:01 6176822 /lib32/ libdl-2.11.3.so f7742000-f7746000 rw-p 00000000 00:00 0 f7746000-f7747000 r-xp 00000000 00:00 0 [vdso] f7747000-f7763000 r-xp 00000000 08:01 6176779 /lib32/ ld-2.11.3.so f7763000-f7764000 r--p 0001b000 08:01 6176779 /lib32/ ld-2.11.3.so f7764000-f7765000 rw-p 0001c000 08:01 6176779 /lib32/ ld-2.11.3.so ffaf8000-ffb0d000 rw-p 00000000 00:00 0 [stack] |
|
|
|
|
|
#2337 |
|
Little Clucker
![]() Join Date: Apr 2010
Posts: 25
Reputation: 1
|
With the MYSQL Plugin R6 at SAMP 03d RC2 the server will close the conection after connecting.
Why is it so? pls. help me! |
|
|
|
|
|
#2338 |
|
Big Clucker
![]() ![]() Join Date: Apr 2012
Posts: 127
Reputation: 2
|
Am I able to use MySQL on my own server which is hosted by my own computer? Or do I need a server host?
|
|
|
|
|
|
#2339 |
|
Big Clucker
![]() ![]() Join Date: Aug 2010
Location: The Netherlands
Posts: 109
Reputation: 15
|
|
|
|
|
|
|
#2340 |
|
Little Clucker
![]() Join Date: Mar 2012
Posts: 1
Reputation: 1
|
Hello. I usually hate asking for help, but I really can't figure this out myself and I have searched for this problem. The problem is that it loads just fine in my computer and remote server, however it doesn't load in server after gmx. Yet everything in my pc works just fine. Does anyone have had any similar problems or know solution to this. Both are windows machines. My pc runs Win 8 Consumer Preview thing and server runs 2008 R2
Thank you in advance |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Google Project: Glass | int3s0 | Everything and Nothing | 99 | 26/02/2013 04:22 PM |
| MySQL Plugin R5 plugin problem | dud | Scripting Help | 12 | 05/12/2011 06:28 PM |
| Strikens Mysql vs BlueG's Mysql plugin | PrawkC | Scripting Help | 4 | 30/09/2011 10:30 AM |
| [help][plugin] Can't load mysql plugin | mariomako | Help Archive | 8 | 16/07/2011 02:37 PM |
| mysql plugin. loading plugin failed | ikkentim | Help Archive | 2 | 10/02/2011 02:32 PM |