SA-MP Forums Archive
Fetching data from text file - 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: Fetching data from text file (/showthread.php?tid=528767)



Fetching data from text file - Burning - 29.07.2014

Im trying to create a settings.txt file which would load settings for example new player spawn with dini.
On gamemode init im using code
newbiePOS[0] = dini_Int("settings.txt","spawnX");

How should I fix that, this code doesnt retrieve my coordinates from txt file. Here's a full example.
Код:
new Float:zaidejoSPAWN[3];
public OnGameModeInit()
{
	SetGameModeText("mysqlGM");

	mysql_debug( true );
	mysql_connect( MySQL_HOST,MySQL_USER,MySQL_DATA,MySQL_PASS );
	if( mysql_ping( ) >= 1 )    print( "\n" );
	else
	{
		print("Prisijungimas prie MySQL DB ( "MySQL_DATA" ) nepavyko !");
	}
	zaidejoSPAWN[0] = dini_Int("nustatymai.txt","spawnX");
	
	return 1;
}
How should I get my configurations' from file?