Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Record Help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tupacalypse_Vinsanity




PostPosted: Sat Jan 21, 2006 1:20 pm   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sat Jan 21, 2006 1:37 pm   Post subject: (No subject)

What do you mean by records? Types? Data files?
Tupacalypse_Vinsanity




PostPosted: Sat Jan 21, 2006 1:38 pm   Post subject: 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




PostPosted: Sat Jan 21, 2006 2:47 pm   Post subject: (No subject)

In a separate Turing file? You're going to have to elaborate.
Tupacalypse_Vinsanity




PostPosted: Sat Jan 21, 2006 3:00 pm   Post subject: ~

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




PostPosted: Sat Jan 21, 2006 4:45 pm   Post subject: (No subject)

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




PostPosted: Sat Jan 21, 2006 7:37 pm   Post subject: (No subject)

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




PostPosted: Sat Jan 21, 2006 7:52 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Rasta Fella




PostPosted: Sat Jan 21, 2006 7:55 pm   Post subject: (No subject)

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.[/url]
Tupacalypse_Vinsanity




PostPosted: Mon Jan 23, 2006 9:39 pm   Post subject: ~

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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: