08.10.2014, 04:46
if you look in dini.inc there is lots of examples of how to read a file or use file function
im a but rusty with it but i gutted dini_get to make this quickly
should print eack line of the file to the console (untested)
hope that helps
im a but rusty with it but i gutted dini_get to make this quickly
should print eack line of the file to the console (untested)
pawn Код:
public printfile(filename[]){
new File:fohnd;
new tmpres[MAX_STRING];
fohnd=fopen(filename,io_read);//open file
if (!fohnd) return 0; //end if dosent exist
while (fread(fohnd,tmpres)) { //read each line
print(tmpres); //print line
}
fclose(fohnd);//close file
return 1;
}