File or function not found
#1

My script had an earlier MySql, it did not get this error, instead I got "Sql connection with database: FAIL!". So I installed the new MySql, but now I get
Код:
"Script[gamemodes/battlefield.amx]: Run time error 19: "File or function is not found"
I can compile my gamemode perfectly, no errors whatsoever. What's up with mysql? When I had my earlier mysql, the Register/login system didn't appear because mysql was damaged, now the new mysql doesn't work? :\
Reply
#2

You need to have a database to connect to in order for your server to work if it says that "Sql connection with database: FAIL" that doesn't mean you need to update the plugin.. you need xampp or wamp and make a database and stuff and put the connection details in gamemode and compile and start the server.. so put that plugin ( mysql ) back
Reply
#3

Probably your plugins need to be updated. Did you create a mysql database??

Add this to gamemodeinit

Код:
		if(mysql_ping(mysqlconnectionvariable) == -1)  //change the variable name
		{
			if(connectionCount == MYSQL_CONNECTION_TRIES - 1)
			{
				printf("The server has failed to connect to MySQL the maximum amount of times, shutting down...");
				SendRconCommand("exit");
				return 1;
			}
			else
			{
				print("Failed to connect to MySQL, retrying...");
			}
		}
		else
		{
			print("The server has successfully connected to MySQL!");
			mysql_debug(SQLDebug);
			break;
		}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)