The result was a dynamic server program that indexes, deletes, and authorises all our doors from two tables (Doors, and Passwords)
I have Ironed out any bugs that directly break the program, but i am having difficulties with how it runs. I cannot delete any of my stored values as my functions don't find them, and i cannot make it remember more than one door.
The code is here: http://pastebin.com/vuHM6azT
What seems to be the biggest problem is the functions that are supposed to create and delete doors from the table.
Also one thing i noticed was that if in a for loop I do this:
for i=0, count() do
if Passwords[i] == password then
return 1
else
(**This is general for all of the loops in the program, not that exact piece of code**)
None of my doors are recognised, however if i do this:
for i=1, count() do
if Passwords[i] == password then
return 1
else
Then the first door i ask the program to store will be recognise, the others will still be unrecognised for some reason.
This is the first time i have attempted to have a program managed information on such a scale. There are probably loads of things that are very inefficient, dont hesitate to bring in new ideas.
Side Note: I lurked around on loads of webpages while building this and took some code and ideas from two other authors. They are listed at the top of the pastebin link
** When I am done with this, and you are browsing this page as desperate for a solution as I was. I will will post the code below (if i remember to), free to use. Hopefully working correct and without issues.