warning 206: redundant test: constant expression is non-zero - 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: warning 206: redundant test: constant expression is non-zero (
/showthread.php?tid=549205)
warning 206: redundant test: constant expression is non-zero -
iBanner - 05.12.2014
Quote:
warning 206: redundant test: constant expression is non-zero
warning 215: expression has no effect
|
Below is the line warning:
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!
Re: warning 206: redundant test: constant expression is non-zero -
Raweresh - 05.12.2014
Show SQL_ definitions.
Re: warning 206: redundant test: constant expression is non-zero -
iBanner - 05.12.2014
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
|
Re: warning 206: redundant test: constant expression is non-zero -
iBanner - 06.12.2014
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