
-----------------------------------
Tupacalypse_Vinsanity
Sat Jan 21, 2006 1:20 pm

Record Help
-----------------------------------
Im having problems with my records, they keep overwriting themselves and i would like to know how i could stop that from happening.

Also if anyone had ideas on editing/deleting the record

-----------------------------------
Cervantes
Sat Jan 21, 2006 1:37 pm


-----------------------------------
What do you mean by records?  Types?  Data files?

-----------------------------------
Tupacalypse_Vinsanity
Sat Jan 21, 2006 1:38 pm

Well
-----------------------------------
Im making final fantasy 7 but i have an account login, and im going to have room for 5 accounts, but whenever you register again it overwrites the first account

The data is being stored in a seperarte turing file

-----------------------------------
Cervantes
Sat Jan 21, 2006 2:47 pm


-----------------------------------
In a separate Turing file?  You're going to have to elaborate.

-----------------------------------
Tupacalypse_Vinsanity
Sat Jan 21, 2006 3:00 pm

~
-----------------------------------
Well for mine when the user makes a new account they must have a username, password and their age, when they input that, a new turing file is created called ff7list.t and the data is stored in there.

-----------------------------------
Delos
Sat Jan 21, 2006 4:45 pm


-----------------------------------
Again, this isn't quite as explicit as we'd like but let's try this anyway:

When you try write to the file, do you just try write the new data?  If so, you will need to seek to the end of the data file before doing so.
An easier way would probably to read in the entire file to a flexible array, add the new data, then rewrite the whole file.  For files of this size, that won't be a problem at all.

Flexy arrays are not difficult to use, and are a huge help.

-----------------------------------
Rasta Fella
Sat Jan 21, 2006 7:37 pm


-----------------------------------
We CAN help...just explain more clearly. Do you wan to call up data files or just read specific code from them. If you want have a look at the Turing Walkthrough.

-----------------------------------
Tupacalypse_Vinsanity
Sat Jan 21, 2006 7:52 pm

Ok
-----------------------------------
This is what has to happen in my program.

Someone who wants to play must have an account, therefor they have to register. When they go to register, they have to enter their name, desired password, and age. This part works fine but since the login and register are 2 different procedures, i cannot run the login since it says the variables have no value, and im not sure if there is a way to combine them into the same procedure because you cant login/register on the same screen so.

-----------------------------------
Rasta Fella
Sat Jan 21, 2006 7:55 pm


-----------------------------------
Check this Tutoriol http://www.compsci.ca/v2/viewtopic.php?t=11079

It's on High Score but you can modify it so it can input and store names.

-----------------------------------
Tupacalypse_Vinsanity
Mon Jan 23, 2006 9:39 pm

~
-----------------------------------
Can you explain to me how i would start to do so? I had a record working where i could have ONE account created but this program needs to have a minimum of 5 and a maximum of unlimited. I need help on making more than one account and also how i could edit/delete their accounts if they chose to.
