Problems with Mysql
#1

i am hosting a cnr gamemode on Ultra-h.com but that GM needs a mysql DB i uploaded the .sql file and did this on my gm (it was ready i just modified it):
Код:
#define SQL_HOST "127.0.0.1"
#define SQL_USER "cant tell user"
#define SQL_PASS "cant tell pass"
#define SQL_DB "port_6560"
and during exploring the script i downloaded i found this:
Код:
public OnGameModeInit()
{
    mysql_debug(1);
	new string[256];

	SetGameModeText("Cops And Robbers");

	ShowNameTags(1);
	ShowPlayerMarkers(1);
	EnableStuntBonusForAll(0);
	AllowInteriorWeapons(1);
	//SetWeather(1);
	//SetGravity(0.008);
	//UsePlayerPedAnims();		// Will cause the players to use CJ running/walking animations
	DisableInteriorEnterExits();  // will disable all interior enter/exits in the game.
	//SetNameTagDrawDistance(50.0); // Distance at which nametags will start rendering on the client.
	//DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking
	//LimitGlobalChatRadius(Float:chat_radius);
	//LimitPlayerMarkerRadius(Float:marker_radius);

	//dmap_GameModeInit();

	MySQLConnect(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB);

	/*if (CREATE_PLAYER_DATABASE == 0)
	{

	mysql_query("CREATE TABLE IF NOT EXISTS server(Server INT(11), Gamemode INT(256))");
	format(string, sizeof(string), "INSERT INTO server (Server, Gamemode) VALUES('1', '1')");
	mysql_query(string);
	}*/

	format(string, sizeof(string), "SELECT * FROM server WHERE Server = '1'");
	mysql_query(string);//Queries
    mysql_store_result(); //Stores the result

	if(mysql_num_rows() > 0) 
    {
		new wdata[128];

		while(mysql_retrieve_row())
		{
		mysql_get_field("Gamemode",wdata);
		CURRENT_GAMEMODE = strval(wdata);
		}

	}else{
	printf("[MYSQL]: Could Not Retrieve Field - Shutting Down Server.");//
	SendRconCommand("gmx");
	}
	mysql_free_result();
and when i try to start the server on Ultra-h.com isee this on my log file:
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[10:59:05] password = ""  (string)
[10:59:05] 
[10:59:05] Server Plugins
[10:59:05] --------------
[10:59:05]  Loading plugin: crashdetect.so
[10:59:05]   CrashDetect v4.16 is OK.
[10:59:05]   Loaded.
[10:59:05]  Loading plugin: streamer.so
[10:59:05] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[10:59:05]   Loaded.
[10:59:05]  Loading plugin: mysql.so
[10:59:05]  SA:MP MySQL Plugin v2.1.1 Loaded.
[10:59:05]   Loaded.
[10:59:05]  Loading plugin: mysqlR7.so
[10:59:05] plugin.mysql: R20 successfully loaded.
[10:59:05]   Loaded.
[10:59:05]  Loading plugin: irc.so
[10:59:05] 

*** IRC Plugin v1.4.8 by Incognito loaded ***

[10:59:05]   Loaded.
[10:59:05]  Loading plugin: mysqlR39.so
[10:59:05] [MySQL] Thread running. Threadsafe: Yes.
[10:59:05]  >> plugin.mysql: R39-6 successfully loaded.
[10:59:05]   Loaded.
[10:59:05]  Loading plugin: audio.so
[10:59:05] 

*** Audio Plugin v0.5 R2 by Incognito loaded ***

[10:59:05]   Loaded.
[10:59:05]  Loading plugin: sscanf.so
[10:59:05] 

[10:59:05]  ===============================

[10:59:05]       sscanf plugin loaded.     

[10:59:05]          Version:  2.8.1        

[10:59:05]    © 2012 Alex "******" Cole  

[10:59:05]  ===============================

[10:59:05]   Loaded.
[10:59:05]  Loading plugin: whirlpool.so
[10:59:05]  
[10:59:05]  ==================
[10:59:05]  
[10:59:05]   Whirlpool loaded
[10:59:05]  
[10:59:05]  ==================
[10:59:05]  
[10:59:05]   Loaded.
[10:59:05]  Loading plugin: mysqlR41.so
[10:59:05]  >> plugin.mysql: R41 successfully loaded.
[10:59:05]   Loaded.
[10:59:05]  Loading plugin: mysqlR6.so
[10:59:05] 

  > MySQL plugin R6 successfully loaded.

[10:59:05]   Loaded.
[10:59:05]  Loading plugin: nativechecker.so
[10:59:05]   Loaded.
[10:59:05]  Loaded 12 plugins.

[10:59:05] 
[10:59:05] Filterscripts
[10:59:05] ---------------
[10:59:05]   Loading filterscript 'UltraHost.amx'...
[10:59:07]   Loading filterscript 'gl_realtime.amx'...
[10:59:09]   Loading filterscript 'gl_property.amx'...
[10:59:11] 
-----------------------------------
[10:59:11] Grand Larceny Property Filterscript		
[10:59:11] -----------------------------------

[10:59:11]   Loading filterscript 'base.amx'...
[10:59:12] 
--Base FS loaded.

[10:59:12]   Loading filterscript 'gl_actions.amx'...
[10:59:14]   Loaded 5 filterscripts.

[10:59:16] Function: mysql_connect called with incorrect parameter count.
[10:59:16] [debug] Server crashed while executing saa.amx
[10:59:16] [debug] AMX backtrace:
[10:59:16] [debug] #0 native mysql_ping () from mysql.so
[10:59:16] [debug] #1 0013eef8 in ?? (5436988, 5437028, 5437068, 5437104) from saa.amx
[10:59:16] [debug] #2 0001260c in public OnGameModeInit () from saa.amx
[10:59:16] [debug] Native backtrace:
[10:59:16] [debug] #0 eb2209f0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
[10:59:16] [debug] #1 eb219a62 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[10:59:16] [debug] #2 eb21a764 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[10:59:16] [debug] #3 eb21c6b4 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[10:59:16] [debug] #4 eb22031d in ?? () from plugins/crashdetect.so
[10:59:16] [debug] #5 eb574410 in __kernel_rt_sigreturn () from linux-gate.so.1
[10:59:16] [debug] #6 eb0e2aec in _Z5ErrorP5MySQLPKci () from plugins/mysql.so
[10:59:16] [debug] #7 eb0e5f0b in _ZN7Natives12n_mysql_pingEP6tagAMXPi () from plugins/mysql.so
[10:59:16] [debug] #8 080950e4 in ?? () from ./sampsvr-port_6560
[10:59:16] [debug] #9 eb21b4d3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[10:59:16] [debug] #10 0a5e8ba8 in ?? () from �T�HT���n
[10:59:16] [debug] ��n
[10:59:16] [debug] ��n
[10:59:16] [debug] ��n
[10:59:16] [debug] �
Reply
#2

Upload the cnr "Sql" on you`r phpmyadmin!
Reply
#3

Wrong plugin, most likely. Almost no-one uses StrickenKid's plugin anymore. Check the gamemode release thread for more information about the correct plugin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)