warning 206: redundant test: constant expression is non-zero
#1

Quote:

warning 206: redundant test: constant expression is non-zero
warning 215: expression has no effect

Below is the line warning:
Quote:

mysql_debug(1);

Here are some following scripts
Quote:

public OnGameModeInit()
{
cHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
mysql_debug(1);
SetGameModeText("Training Server");
UsePlayerPedAnims();

EDIT: I have the latest samp server 03z R2 + latest plugins of MYSQL. Please I need your advice. thank you!
Reply
#2

Show SQL_ definitions.
Reply
#3

Quote:
Originally Posted by Raweresh
Посмотреть сообщение
Show SQL_ definitions.
Do you mean like the ff. below?


Quote:

#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB "test"

and btw, I tried removing mysql_debug(1); then it successfully compiled the script. after I run the server, I have this crashdetect plugin and it shows the ff. below

Quote:

[00:48:46] [debug] Server crashed while executing test.amx
[00:48:46] [debug] AMX backtrace:
[00:48:46] [debug] #0 native mysql_connect () from mysql.dll
[00:48:46] [debug] #1 000093c8 in public IRC_OnGameModeInit () from test.amx
[00:48:46] [debug] #2 native CallLocalFunction () from samp-server.exe
[00:48:46] [debug] #3 00008e14 in public Itter_OnGameModeInit () from test.amx
[00:48:46] [debug] #4 native CallLocalFunction () from samp-server.exe
[00:48:46] [debug] #5 00007ef4 in public SSCANF_OnGameModeInit () from test.amx
[00:48:46] [debug] #6 00001eac in public zcmd_OnGameModeInit () from test.amx
[00:48:46] [debug] #7 native CallLocalFunction () from samp-server.exe
[00:48:46] [debug] #8 00001968 in public ScriptInit_OnGameModeInit () from test.amx
[00:48:46] [debug] #9 00000468 in public OnGameModeInit () from test.amx
[00:48:46] [debug] Native backtrace:
[00:48:46] [debug] #0 5d24a017 in ?? () from LIBMYSQL.dll
Reply
#4

anyone?

Solved: I had to change mysql_debug(1); to mysql_log(LOG_ERROR | LOG_WARNING);

Here below the old topic.

http://forum.sa-mp.com/archive/index.php/t-525462.html
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)