Server restart - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server restart (
/showthread.php?tid=604460)
Server restart -
Addons - 05.04.2016
i've a big probleeemm: sometimes the server restarts unexpectedly
I think here is the problem but i don't know who cause it
Mysql log:
Код:
[12:48:41] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''' at line 1
[13:07:06] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[13:13:54] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[13:52:40] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:15:13] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:15:31] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:15:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:38:37] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[14:57:01] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:19:31] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:24:59] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:26:30] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:28:38] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:36:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:45:18] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[15:47:50] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''\'' at line 1
[15:52:03] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[16:13:32] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:14:49] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''' at line 1
[16:22:51] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:23:33] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:23:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:23:36] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[16:24:29] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
Re: Server restart -
Harty - 05.04.2016
Post the related stock.
Re: Server restart -
Addons - 05.04.2016
I don't know where's stock
I think #1064 means something..
Re: Server restart -
AndySedeyn - 05.04.2016
Quote:
Originally Posted by Harty
stock.
|
Quote:
Originally Posted by Addons
stock
|
Function*; the stock keyword is a function modifier. There isn't such a thing as 'a stock' when describing a function.
Show me the code where you send the SQL query and the function where you process the retrieved data.
EDIT: the log you provided, is that the log before the server restarts or after? If it's after, then you might want to check what happens before it restarts.
Re: Server restart -
Addons - 05.04.2016
before.
You mean
Код:
public MySQLCheckAccount(sqlplayersname[])
{
new query[128];
new escstr[MAX_PLAYER_NAME];
mysql_real_escape_string(sqlplayersname, escstr);
format(query, sizeof(query), "SELECT `ID` FROM users WHERE `name` = '%s'", escstr);
mysql_query(SQL,query);
mysql_store_result();
if (mysql_num_rows()==0)
{
mysql_free_result();
return 0;
}
else
{
new strid[32];
new intid;
mysql_fetch_row(strid);
intid = strval(strid);
mysql_free_result();
return intid;
}
}
?
Re: Server restart -
AndySedeyn - 05.04.2016
What version of MySQL are you even using? Update the include, plugin and syntax in your script. The connection is probably not closed upon OnGameModeExit.
Re: Server restart -
Addons - 05.04.2016
I use Mysql R5. Crashdetect will help me to detect the error source?
Re: Server restart -
Morpheine - 05.04.2016
Код HTML:
public MySQLCheckAccount(sqlplayersname[])
{
new gQuery[128];
gQuery[0] = (EOS);
new escstr[MAX_PLAYER_NAME];
mysql_escape_string(sqlplayersname, escstr);
mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT `ID` FROM `users` WHERE `name` = '%s' LIMIT 1", escstr);
new Cache:result = mysql_query(SQL, gQuery);
if(cache_num_rows())
{
cache_delete(result);
return 1;
}
cache_delete(result);
return 0;
}
Re: Server restart -
Addons - 05.04.2016
this make server restart?