Need help with getting file name to string
#1

Hello , i got .ini files in the folder . and i wanna get all the file names from the folder to the string.

i writed some random test code , i am a little bit beginner of it and i am stuck on it

can someone help me to fix this stupid code ?

reping too who helps , thanks.

pawn Код:
new kFile[256];
    new string235[2012];
   
    for(new i; i < MAX_RACES; i ++)
    {
    format(kFile, sizeof(kFile), "/initest/%s.ini", RaceListName[i]);
   
    while(strcmp(RaceListName[i]))
    {
    strcat(string235, RaceListName[i], sizeof(string235));
    }
   
    }
   
    ShowPlayerDialog(playerid,10729,DIALOG_STYLE_MSGBOX,"Ini Names",string235,"Close","");
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
The only way to list the files in a directory (well, not the only way, but the only way that doesn't hang your PC for several hours) is using a plugin such as y_files:

https://sampforum.blast.hk/showthread.php?tid=177028

If you follow the chain of links (I should really fix that), you end up here for an example:

https://sampforum.blast.hk/showthread.php?tid=60282
you mean y_ini ?
Reply
#3

i just only need to load like 3-10 files , i dont think it is going to lagg the server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)