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 / small example for saving & loading?

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 10th Sep 2006 20:05
anyone have a small code snippet to show how to save & load a game??
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Sep 2006 23:16 Edited at: 10th Sep 2006 23:20
You can save and load arrays with the "save array" and "load array" commands.

To make a normal save file you could do something like this-


and then open with


If you want the text file to look as you would expect when you open it with notepad, use write string and read string. This would make it easy to change information outside of the program.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 10th Sep 2006 23:29
You've already posted about this and I answered you. My tutorial should have helped. Anyway, here is an example in 3D. It'll save where you are in the world and which way you're facing with the space key. You can come back later and load it with the enter key. you'll be in the same spot as you were when you saved. It uses the SAVE ARRAY and LOAD ARRAY commands.



David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 10th Sep 2006 23:40
thankyou very much for the help!

sorry about asking again.

Login to post a reply

Server time is: 2024-11-27 07:51:13
Your offset time is: 2024-11-27 07:51:13