SA-MP Forums Archive
Server crashed while executing CRP.Amx - 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 crashed while executing CRP.Amx (/showthread.php?tid=610967)



Server crashed while executing CRP.Amx - Jumberi - 30.06.2016

Function: mysql_connect called with incorrect parameter count.
[23:40:40] [debug] Server crashed while executing CRP.amx
[23:40:40] [debug] AMX backtrace:
[23:40:40] [debug] #0 native mysql_query () from mysql.so
[23:40:40] [debug] #1 00019ce8 in public zcmd_OnGameModeInit () from CRP.amx
[23:40:40] [debug] #2 native CallLocalFunction () from samp03svr
[23:40:40] [debug] #3 0000a74c in public SSCANF_OnGameModeInit () from CRP.amx
[23:40:40] [debug] #4 00004ab4 in public Itter_OnGameModeInit () from CRP.amx
[23:40:40] [debug] #5 native CallLocalFunction () from samp03svr
[23:40:40] [debug] #6 00002d50 in public ScriptInit_OnGameModeInit () from CRP.amx
[23:40:40] [debug] #7 00001c7c in public OnGameModeInit () from CRP.amx
[23:40:40] [debug] Native backtrace:
[23:40:40] [debug] #0 f73b8e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[23:40:40] [debug] #1 f73b1bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[23:40:40] [debug] #2 f73b2dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[23:40:40] [debug] #3 f73b3226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[23:40:40] [debug] #4 f73b8adc in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #5 f77b3bc0 in __kernel_rt_sigreturn () from linux-gate.so.1
[23:40:40] [debug] #6 f7279aec in _Z5ErrorP5MySQLPKci () from plugins/mysql.so
[23:40:40] [debug] #7 f727daab in _ZN7Natives13n_mysql_queryEP6tagAMXPi () from plugins/mysql.so
[23:40:40] [debug] #8 080950e4 in ?? () from ./samp03svr
[23:40:40] [debug] #9 f73b494b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[23:40:40] [debug] #10 f73b78f8 in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #11 f73bb916 in amx_Exec () from plugins/crashdetect.so
[23:40:40] [debug] #12 f73b3be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[23:40:40] [debug] #13 f73b7659 in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #14 080dfd62 in ?? () from ./samp03svr
[23:40:40] [debug] #15 080950e4 in ?? () from ./samp03svr
[23:40:40] [debug] #16 f73b494b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[23:40:40] [debug] #17 f73b78f8 in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #18 f73bb916 in amx_Exec () from plugins/crashdetect.so
[23:40:40] [debug] #19 f73b3be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[23:40:40] [debug] #20 f73b7659 in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #21 080dfd62 in ?? () from ./samp03svr
[23:40:40] [debug] #22 080950e4 in ?? () from ./samp03svr
[23:40:40] [debug] #23 f73b494b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[23:40:40] [debug] #24 f73b78f8 in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #25 f73bb916 in amx_Exec () from plugins/crashdetect.so
[23:40:40] [debug] #26 f73b3be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[23:40:40] [debug] #27 f73b7659 in ?? () from plugins/crashdetect.so
[23:40:40] [debug] #28 080a503b in ?? () from ./samp03svr
[23:40:40] [debug] #29 080ab922 in ?? () from ./samp03svr
[23:40:40] [debug] #30 080aa0fd in ?? () from ./samp03svr
[23:40:40] [debug] #31 f73f4517 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6

can you help me with this guys?


Re: Server crashed while executing CRP.Amx - Stinged - 30.06.2016

Quote:
Originally Posted by Jumberi
Посмотреть сообщение
Function: mysql_connect called with incorrect parameter count.
I don't know if this is what's causing the crash, but you're using mysql_connect incorrectly.
https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_connect

Check the link above to understand how it's used.
If you still don't know how to fix it, post the line here.


Re: Server crashed while executing CRP.Amx - Jumberi - 30.06.2016

Quote:
Originally Posted by Stinged
Посмотреть сообщение
I don't know if this is what's causing the crash, but you're using mysql_connect incorrectly.
https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_connect

Check the link above to understand how it's used.
If you still don't know how to fix it, post the line here.
public OnGameModeInit()
{
Streamer_TickRate(150);
Streamer_CellDistance(300);
new ip[ 32 ];
GetServerVarAsString( "bind", ip, sizeof( ip ) );
mysql_connect(HOST_ADDR, HOST_USER, HOST_PASS, HOST_DATA);
if(fexist("IBP/Other/JoinCounter.cfg"))
{
JoinCounter = dini_Int("IBP/Other/JoinCounter.cfg", "Connections");
} else {
dini_Create("IBP/Other/JoinCounter.cfg");
dini_IntSet("IBP/Other/JoinCounter.cfg", "Connections", 0);
}
also it is script of Country RP [ IBP RP EDIT[


Re: Server crashed while executing CRP.Amx - Stinged - 30.06.2016

It should be:
(const host[], const user[], const database[], const password[])
and not
(const host[], const user[], const password[], const database[])

Also, post the defines for HOST_*


Re: Server crashed while executing CRP.Amx - Jumberi - 30.06.2016

Quote:
Originally Posted by Stinged
Посмотреть сообщение
It should be:
(const host[], const user[], const database[], const password[])
and not
(const host[], const user[], const password[], const database[])

Also, post the defines for HOST_*
#define MAP_NAME "Los Santos"
#define PASSWORD ""
#define HOST_ADDR "localhost"
#define HOST_USER "H20483"
#define HOST_DATA "EVEBASE20483"
#define HOST_PASS "melamiqo123"