Page 1 of 1

PostPosted: Sun Jan 07, 2001 11:30 am
by Justinespinosa
I don't know why, but on the PsPC, the
fileopen() command sometimes failed to open the files with no apparent reasons.
You can see it in pike and launchpad that the message "Didn't find any icons !" sometimes comes before the program reads the file !
This is a big bug.<img src=icon_smile_dead.gif border=0 align=middle>

But i have the solution. <img src=icon_smile_cool.gif border=0 align=middle>

you just need to do something like this.


<pre id=code><font face=courier size=2 id=code>

int fh;

fh = fileopen(filename,0,0);
if(fh =-1){
if(strlwr(fileenum(1,filename)) == strlwr(strright(filename,strlen(filename)-strrchr(filename,"\\")-1)))
while(fh=-1)
fh = fileopen(filename,0,0);

}else{
alert("file not found !");
}


</font id=code></pre id=code>

this is working fine and open always the file !
I hope this will help someone who got problems !


J.Espinosa

OUTS Softwares

Edited by - Justinespinosa on 01/08/2001 03:17:53