Opening files
#1

Hey. I wanna open all files that exist in folder which are named by numbers - but it ain't work. What's wrong?

Код:
	new string[64];
	new File:item;
	for(new i = 0; i < MAX_ITEMS; i++){
	    if(item){
			format(string, sizeof(string), "scriptfiles\\items\\%i.ini", i);
		    item=fopen(string, io_read);
		    printf("file %i", i);}}
Reply
#2

PHP код:
new string[64];
new 
File:item;
for(new 
0MAX_ITEMSi++){
    
format(stringsizeof(string), "/items/%i.ini"i); //in scriptfiles
    
if(fexist(string)){
        
item fopen(stringio_read);
        
printf("file %i"i);
    }

Reply
#3

Awesome, thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)