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.

Author
Message
Lance Lumpy
20
Years of Service
User Offline
Joined: 21st Feb 2004
Location: On My Computer
Posted: 22nd Feb 2004 18:30
I Am Making A Program Where You Can Deposit Money, And Withdraw It. How Can You Save The Money You Have So When You Close The Program And Start It Again You Still Have The Same Balance. Please Help!

Support Everton FC - They're The Best!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Feb 2004 06:12
if you dont want people to cheat so easily consider saving it into an array instead of a text file.

use a (zero) in the save array commands usage regardless of dimension size.

SAVE ARRAY Filename, Array Name(0)

or as an example whilst ignoring the array zero location

dim PlayerMoney(1) : PlayerMoney(1) = 45
SAVE ARRAY "PlrMoney.dat", PlayerMoney(0)


The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 23rd Feb 2004 08:17
Um...
Indi's method I recommend also but I use another way. It may be a little out of your league right now but I suggest you use it later on.

I suggest you make your own encryption so characters on the keyboard are transformed into others.... Then have the program save it like that and work backwards when you want to read.. Dont tell anyone your encryption and you will be fine.

Hope I helped.

Nicolas

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Feb 2004 09:37
take a look at my new tutorial in the code snippets

"eureka" - Archimedes
Tim Ballisto
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Right behind you.
Posted: 24th Feb 2004 00:38
if you favor simplicity over security, try these.

open to write "gimme.dat",1
write float 1,balance#
close file 1

and

open to read "gimme.dat",1
read float 1,balance#
close file
Lance Lumpy
20
Years of Service
User Offline
Joined: 21st Feb 2004
Location: On My Computer
Posted: 24th Feb 2004 17:54
Thanks All!!!

Support Everton FC - They're The Best!

Login to post a reply

Server time is: 2024-11-26 05:31:41
Your offset time is: 2024-11-26 05:31:41