Load a specific file [y_ini].
#1

Hi,

I want to load a specific number from database:

I have a file like:

Код:
0.ini
1.ini
2.ini
3.ini
4.ini
5.ini
6.ini
And there is many, but how to load a specific file, when i want to load

format( STRING, 20,"wac/%d.ini", MYVARIABLE[ playerid ] );
INI_Load(STRING);

Код:
INI:whatineedwritehere?[](name[], value[])
{

}
Reply
#2

If I'm not wrong, INI loads these variables into an enum (which we use as "PlayerInfo[playerid][pEnum]"). When you want to load from someone's file, you just have to use PlayerInfo[playerid][pEnum], and it is going to use that variable.

Note, you have to replace pEnum with your own variable.
Reply
#3

No.. I ask how i need to know what file loading and i can get a what i need...
Reply
#4

Because i'am what to check if file exist instantly load because i want to write everything to one string.

Код:
new BIGMIAU[ 2000 ];
new i = 0;
for( i = 0; i < MAX_PLAYERS; i ++)
{
if( IsPlayerConnected( i ) )
{	
format( String[ playerid ], 30,"offers/%d.ini", MIAU[ playerid ] );

						    if(fexist(String[ playerid ]))
							{
// HERE I NEED TO A LOAD WHAT IS IN offers/%d.ini FILE
// BECAUSE
format( BIGMIAU, 1999,"%s%d. %s %s .. other parametres",  BIGMIAU, MIAU[ playerid ], ... );
}
MIAU[ playerid ] ++;
}
}
ShowPlayerDialog(playerid,,, BIGMIAU );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)