SA-MP Forums Archive
Need urgent help pls... - 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: Need urgent help pls... (/showthread.php?tid=541921)



Need urgent help pls...[++REP] - TFreemen - 15.10.2014

Got any idea why my bName and bOwnerName doesn`t load?Everything else works just fine...Only string doesn`t load properly.
Код:
LoadBusiness()
{
	new string2[128];
	new businessid[MAX_BUSINESSES];
	format(string2, sizeof(string2), "Businesses.ini", businessid);
	new File: BusinessesFile = fopen(string2, io_read);
	if ( BusinessesFile )
	{
	    new key[ 256 ] , val[ 256 ];
	    new Data[ 256 ];
	    while ( fread( BusinessesFile , Data , sizeof( Data ) ) )
	   {
		new string[128];
		for(new idx = 0; idx < MAX_BUSINESSES; idx++)
		{
                    key = ini_GetKey( Data );

                    format(string, 128, "%dName", idx);
                    if( strcmp( key, string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(Businesses[idx][bName], val, 0, strlen(val)-1, 255); }
                    format(string, 128, "%dOwnerName", idx);
                    if( strcmp( key, string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(Businesses[idx][bOwnerName], val, 0, strlen(val)-1, 255); }
                    .......................................................



Re: Need urgent help pls... - TFreemen - 15.10.2014

NVM fixed...