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.

DarkBASIC Discussion / Private information program

Author
Message
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 23rd Dec 2005 11:47
I'm making a program that allows anyone who uses it to write anything they want to into a file that is password protected 3fold and can only be accessed by them through the program, but when I tested it, it prints the passwords in the "view entry" field. I don't understand why.

I am a Christian and I know that God loves me. That is what makes my life so great!
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 23rd Dec 2005 13:13
Here's my hypothesis:

It might be not correct but I'll give it a go...

I think the problem might be here


You're not closing the file but you keep it open. In other words, the next string it will read might not be the one you want because if it was open, you already read in it.

For example:
you open to read, the passwords are after the entries and you just read the entries.
The file keeps open and you reread it again somewhere.
This makes the first 3 entries the 3 passwords you wrote in the file...
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 23rd Dec 2005 20:17 Edited at: 23rd Dec 2005 20:44
There are three things you need to be doing.

You need to make an array for all the strings and use "save array" and "load array" to save/load that information quickly (and on one line of code). Also you should use for/next loops for any printing to reduce the size of your code.

Using save/load array also gets rid of the need to open/close files and allows you to save a file that already exists (rather than having to delete the file before writing).

Hope this helps.




Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 29th Dec 2005 12:58
Thanks guys, I'll bear these ideas in mind and I'll try them if my new idea doesn't work out: my new idea is to store passwords and notes in seperate files, i.e.

""+user$+" passwords.private information file"
""+user$+" notes.private information file"

My original thought on this file idea was I was worried about taking up too much system space, but as I beta tested it, I realised that a full private information file contained only about 60 bytes, if that!
Thanks anyway!

I am a Christian and I know that God loves me. That is what makes my life so great!
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 29th Dec 2005 13:01
by the way, i had a really troublesome but fun time trying to get the fadein/fadeout correct. sometimes it wouldn't fade in or out and as i went back to the code my mind drew a complete blank for some reason, my brain refused to concentrate and i got lost in the source code, staring at the screen for ages in a hypnotic trance. that was fun...

I am a Christian and I know that God loves me. That is what makes my life so great!
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 30th Dec 2005 11:58
Quote: "my mind drew a complete blank for some reason, my brain refused to concentrate and i got lost in the source code, staring at the screen for ages in a hypnotic trance. that was fun..."


Welcome to our world
Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 4th Jan 2006 10:17
cool! at least i'm not the only one!!! LOL! program all sorted now, using different file types for passwords and notes. thanks for help anyway

I am a Christian and I know that God loves me. That is what makes my life so great!

Login to post a reply

Server time is: 2025-05-22 23:54:16
Your offset time is: 2025-05-22 23:54:16