SA-MP Forums Archive
File or function not found - 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: File or function not found (/showthread.php?tid=397976)



File or function not found - Eminem 2ka9 - 07.12.2012

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? :\


Re: File or function not found - InfiniTy. - 07.12.2012

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


Re: File or function not found - AaronKillz - 07.12.2012

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;
		}