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

[Immibis Peripheral] Mag-card Password security system

Started by niccosaint, 20 August 2014 - 02:55 PM
niccosaint #1
Posted 20 August 2014 - 04:55 PM
VERSION Beta2 [WIP]

Have you ever wanted to get security system using Mag-stripe cards like in real life ?


Now you can get this HERE !!


Depencies:
  • ComputerCraft
  • Immibis Peripherals
Features:
  • Configurable passwords: User and admin
  • Configurable opening time
  • Infos on monitor: Admin entry, wrong passwords
To-do:
  • Bugfix - Passwords don't work correctly
  • Get more expirience in Lua (my first program, bugs expected no bugs here ;)/> )
  • Guest entry (one time entry)
  • Only chosen users can enter
  • reply if you want more
Screenshots:




  1. Unknown user tries to enter
  2. Admin entry
  3. User Entry
  4. Idle
  5. Example mechanism
Get it Here:

CC: pastebin get EE9cw3rj magsecurity
http://pastebin.com/EE9cw3rj
Edited on 22 August 2014 - 10:52 AM
Dragon53535 #2
Posted 20 August 2014 - 07:49 PM
I believe that your passwords are supposed to be saved as strings and that may be why your passwords don't work correctly.
Try doing

local combo = "123" -- Can be password, level etc.
local adminCombo = "ADMIN" -- Admin password
Instead of

local combo = 123 -- Can be password, level etc.
local adminCombo = ADMIN -- Admin password

Also you're deciding that whatever they do the output is always on the back. You should add

local side = "back"
to the top and have that be able to be changed for ease of use and then use side in your rs.setOutput()'s
Edited on 20 August 2014 - 05:51 PM
niccosaint #3
Posted 21 August 2014 - 03:39 PM
I believe that your passwords are supposed to be saved as strings and that may be why your passwords don't work correctly.
Thanks Dragon, but you know, this is my first program.
I'll change pastebin code due to correcting program.
When i'll have faster net i add screenshots
Dragon53535 #4
Posted 21 August 2014 - 09:36 PM
Thanks Dragon, but you know, this is my first program.
And that's perfectly fine, that's why i helped out :P/>

Perhaps you didn't quite understand, your rs.setOutput's should be rs.setOutput(side,true) you still have to declare the side, however you have already defined at the top side = "back" which is the same as putting rs.setOutput("back",true) but it allows it to be changed only in one spot rather than many.
niccosaint #5
Posted 22 August 2014 - 09:47 AM
Perhaps you didn't quite understand, your rs.setOutput's should be rs.setOutput(side,true) you still have to declare the side, however you have already defined at the top side = "back" which is the same as putting rs.setOutput("back",true) but it allows it to be changed only in one spot rather than many.

I know but yesterday i haven't net that's why i didn't update code
halsey07 #6
Posted 01 October 2015 - 07:28 PM
The card says Access denied when i try it how do I fix it