This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jk4897's profile picture

Banking System Help, [And Explanation]

Started by Jk4897, 27 November 2014 - 02:49 PM
Jk4897 #1
Posted 27 November 2014 - 03:49 PM
Hello Computercraft users of the world :D/>

Basically, I am creating a 100% CC Banking Database (Serverside only for now) for a FTB Server I am staff for
(Take note, this is not a System for distribution, but rather a database to keep track of funds, which are, in this case, Industrial Credits)
Here is what, ideally, it will do:

Read a Floppy Disk containing the players "credentials/identification"
Check the 'database' of accounts, (preferably without displaying them to the person operating the computer)
Display how many credits are associated with the account, distribution not required.

in pseudocode:
begin pseudocode

Check if disk credentials are in database

If yes then

Display credits for that account.
Give option to add/remove credits from account

if deposting then

add industrial credits to bank safe (done by redpower/BC/etc)
add credits into digital account balance

if removing then

Give Player inputted amount of credits
subtract inputted amount from player digital balance

if "exit/nothing" then

return to "idle/ready to use stage"

if not then

add new account to the database, starting with 0 credits.

]
end psuedocode


Sorry for the messy pseudocode, I had it formatted and everything, but forum post preview didn't like the formatting & removed it


The problem is, I have never worked with CC serverside(database)-clientside(access) programs, as all my programming typically takes place in 1 computer on it's own, and even if so, it has been a long time since i last used databases/storing information long term.

If Someone/Some people more experienced than me could do either and/or all of the following, that would be greatly appreicated:

-Give a "skeleton example" of a serverside database (with basic functions, or explanation on how to add them)

-Write out a possible solution

-if you feel really generous, write out the program in such a way I can understand and learn from it (Comments, etc)

-link an example of a simple database in computercraft
Rougeminner #2
Posted 01 December 2014 - 08:09 AM
what version of computercraft is the server using the mc version should be just fine.


I will build for direwolf 20 pack 1.0.2 which is computercraft version 1.65
Edited on 03 December 2014 - 02:14 AM