I already tried with Greeps idea and I was able to pull this one off. But I haven't seen GameDevDan's code since i left to bed early. I tried it now and it caused a glitch where it opens the file many times without stop. However, I'm going with Greeps idea since I already tried it and worked very well. Thanks guys!
PS:
Here is what I did:
Script213:
var ii, ee, oo;
for (ii=0; ii<40; ii+=1)
{
ee=string_char_at(levelname,ii)
if ee=="."
{
oo=string_copy(levelname,ii,4)
return oo
}
}code for opening a file:
levelname = get_open_filename("BBXD Level (.bbxd)|*.bbxd|Chain Level(.cl9)|*.cl9",".bbxd")
yuo=script213()
if yuo==".cl9"
{/*blah blah blah*/}
if yuo==".bbx"
{/*blah blah blah*/}
else
{show_message("Opening non-compatible file!")
Edited by MisuMen49, 07 April 2012 - 01:29 PM.