Need urgent help pls...
#1

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); }
                    .......................................................
Reply
#2

NVM fixed...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)