-
Array Trouble
I'm trying to save & load arrays a directory but i'm unsure what file format they are in. I always thought they were .arr but when I try load them using:
AppDataDirectory$( "File" )+"\dep"+"str.arr"
I get a syntax error. I even tried:
AppDataDirectory$( "File" )+"\POLR"+"\dep"+"str"
and got the same error.
Thanks for your help in advance :D
-
Re: Array Trouble
Your expression refers to the file object, so it won't work if you don't have that object in your frame. To see what path it generates, set a string object to the same expression and see what it comes up with. The file extension used by the array object is .arr by default, but it can be anything so long as there is consistency.
An example of how to use arrays should be on MMF2 CD #2 under \Objects\Array\array.mfa.
-
Re: Array Trouble
AppDataDirectory$( "File" )+"\dep"+"str.arr"
if DEP is a folder you need to change it to:
AppDataDirectory$( "File" )+"\dep\str.arr"
-
Re: Array Trouble
The file format doesn't matter, the syntax error is probably because of you writing something wrong in your expression.
Why did you include "\POLR"+"\dep"? The expression should be a path to the file. ex: Apppath$ + "data\str.arr"
-
Re: Array Trouble
Sry that was a mistake.
I'm trying to make it read from the Application Data folder because I'm running vista and MMF2 won't write to the application's directory.
I tried:
AppDataDirectory$( "File" )+"\dep\str.arr"
still got a syntax error :(
EDIT: Joshtek was right, I forgot to include the file object. My bad. I'll be certain to check out those tutorials on the MMF CD :) Thanks guys for your help.