Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Saving Files? What am I doing wrong?

Author
Message
Ramsy
15
Years of Service
User Offline
Joined: 4th Jun 2009
Location: Melbourne
Posted: 1st Feb 2010 05:24
I've been putting together an editor of sorts to go with my game. That way we can tweak the game settings for better gameplay and save it as a "DefaultSettings" file.



The array I'm using to store the settings is made from User Defined Types and not just a standard array. Since I can't simply save this array (Not sure why that is but DBPro doesn't like it) I have to convert the array into a memblock and save that.

But apparently I'm doing something wrong when opening the file. This is the first time I've used file commands, it seemed pretty straight forward but doesn't seem to work. When I get to the "Write Memblock" command I get the error that the file is not open to write.

What am I missing? Help would be greatly appreciated, I've been stumped on this for days.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 1st Feb 2010 13:21


that line not need, as the next line in your code does this for you.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-09-28 14:22:54
Your offset time is: 2024-09-28 14:22:54