[HELP] MySQL error causes script to not compile
#1

Hello, and thank you for viewing this thread.

On Saturday night, our team began the process of upgrading from Windows Server 2008 to Windows Server 2012, possibly to combat any form of lag that we would be facing, etc.

All of this went smooth, and the transfer completed, but the script will not compile. The error we were originally getting was this:

Quote:

(error 010: invalid function or declaration) error for this (native mysql_fetch_row(dest[], const splitter[] = "|", MySQL:handle = (MySQL:0)); )

We believe we had gotten this to go away by simply using the "laws of scripting". An invalid function or declaration in scripting often means that you forgot a bracket somewhere, but in this case it looks like either in our script or the mysql plugin there is a syntax problem. Whether that be a ";" or "[" they need to double check the scripting of the MySQL plugin, which we have done.

We're now stuck with this error:

Quote:

native mysql_fetch_row(dest[], const splitter[] = ".", MySQL:handle = (MySQL:0));

The only other instance in this script appears in our /oban feature, or "offline ban" which can be viewed below.

Quote:

format(sqlQuery, sizeof(sqlQuery), "SELECT `IP` FROM `samp_users` WHERE `Username`='%s' AND `AdminLevel` < 2", acct);
mysql_query(sqlQuery); mysql_store_result(); new ips[32]; mysql_fetch_row(ips); mysql_real_escape_string(result,escreason);
format(sqlQuery, sizeof(sqlQuery), "INSERT INTO `samp_bans` SET `IP`=INET_ATON('%s'), `BannedBy`='%s', `BanReason`='%s', `BanName`='%s'", ips, GPN(playerid), escreason, acct);
mysql_fetch_row(ips)

We originally believed, while a longshot, that this feature was causing the issue, but removing it had done nothing. We've went through all MySQL commands within this instance, but this is our only use of it.

We've also tried switching MySQL plugins, which did not work. Seeing as this is a compiling error, we cannot get any data from the MySQLDebug.txt, meaning all we have is what we're getting from the compiler.

Edit: Rewriting our /oban command, we got the script to compile, except now we get this error:

Quote:

[08:49:06] Error: Function not registered: 'mysql_query'
[08:49:06] Error: Function not registered: 'mysql_fetch_int'
[08:49:06] [debug] Run time error 19: "File or function is not found"
[08:49:06] [debug] mysql_query
[08:49:06] [debug] mysql_fetch_int
[08:49:06] [debug] Run time error 19: "File or function is not found"
[08:49:06] [debug] mysql_query
[08:49:06] [debug] mysql_fetch_int
[08:49:06] Script[gamemodes/hbgrp.amx]: Run time error 19: "File or function is not found"
[08:49:06] Number of vehicle models: 0
[08:49:38] --- Server Shutting Down.
[08:49:38] [debug] Run time error 19: "File or function is not found"
[08:49:38] [debug] mysql_query
[08:49:38] [debug] mysql_fetch_int

The error above is now dated, and we've switched back to the correct MySQL plugin aaaand here we are:

Quote:

[08:58:49] [debug] Server crashed while executing hbgrp.amx
[08:58:49] [debug] AMX backtrace:
[08:58:49] [debug] #0 native fclose () [004056f0] from samp-server.exe
[08:58:49] [debug] #1 000ee8c0 in ?? () from hbgrp.amx
[08:58:49] [debug] #2 000f013c in public FC_OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] #3 native CallLocalFunction () [00471e90] from samp-server.exe
[08:58:49] [debug] #4 00021c50 in public S@@_OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] #5 native CallLocalFunction () [00471e90] from samp-server.exe
[08:58:49] [debug] #6 0000ac40 in public Itter_OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] #7 native CallLocalFunction () [00471e90] from samp-server.exe
[08:58:49] [debug] #8 00005ce0 in public ScriptInit_OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] #9 native CallLocalFunction () [00471e90] from samp-server.exe
[08:58:49] [debug] #10 00002f9c in public zcmd_OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] #11 native CallLocalFunction () [00471e90] from samp-server.exe
[08:58:49] [debug] #12 0000293c in public Streamer_OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] #13 native CallLocalFunction () [00471e90] from samp-server.exe
[08:58:49] [debug] #14 00000a68 in public OnGameModeInit () from hbgrp.amx
[08:58:49] [debug] System backtrace:
[08:58:50] [debug] #0 004056fd in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #1 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #2 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #3 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #4 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #5 0047219e in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #6 004010b6 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #7 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #8 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #9 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #10 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #11 0047219e in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #12 004010b6 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #13 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #14 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #15 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #16 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #17 0047219e in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #18 004010b6 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #19 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #20 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #21 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #22 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #23 0047219e in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #24 004010b6 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #25 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #26 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #27 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #28 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #29 0047219e in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #30 004010b6 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #31 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #32 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #33 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #34 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #35 0047219e in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #36 004010b6 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #37 5a72340a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #38 5a725aa6 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #39 5a71d621 in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #40 5a72345a in ?? () from F:\Dropbox\Dropbox\Server\plugins\crashdetect.DLL
[08:58:50] [debug] #41 0046e194 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #42 65646f6d in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #43 62682f73 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #44 2e707267 in ?? () from F:\Dropbox\Dropbox\Server\samp-server.exe
[08:58:50] [debug] #45 00786d61 in ?? ()

Quote:
Thank you for reading in advanced, and hopefully you'll be able to give some insight.
Reply
#2

I've added new info, I believe we're making some progress, but I am not sure. Thanks in advance for any help.
Reply
#3

Looks to me like you guys forgot to upload all of the .cfg files (ie families.cfg jobs.cfg etc)

Most of the file loading is done together in OnGameModeInit()

pawn Код:
[08:58:49] [debug] #0 native fclose () [004056f0] from samp-server.exe
[08:58:49] [debug] #1 000ee8c0 in ?? () from hbgrp.amx
[08:58:49] [debug] #2 000f013c in public FC_OnGameModeInit () from hbgrp.amx
I may be wrong though this is just a wild guess.
Reply
#4

Quote:
Originally Posted by new121
Посмотреть сообщение
Looks to me like you guys forgot to upload all of the .cfg files (ie families.cfg jobs.cfg etc)

Most of the file loading is done together in OnGameModeInit()

pawn Код:
[08:58:49] [debug] #0 native fclose () [004056f0] from samp-server.exe
[08:58:49] [debug] #1 000ee8c0 in ?? () from hbgrp.amx
[08:58:49] [debug] #2 000f013c in public FC_OnGameModeInit () from hbgrp.amx
I may be wrong though this is just a wild guess.
What this guy said. But:

Be sure to check all of your files also. Not just the config files.
Reply
#5

You're correct, we made a HUGE rookie mistake... We're doing the file transfer now, and hopefully this will fix our problem.
Reply
#6

Quote:
Originally Posted by MichaelLoreno
Посмотреть сообщение
You're correct, we made a HUGE rookie mistake... We're doing the file transfer now, and hopefully this will fix our problem.
Glad your issue was resolved. Best of luck with your server!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)