As i am beginning to learn programation, and playing tekkit lite, i though of using computercraft to get familiarized with coding in a fun environment.
I'm basically a beginner.
In order to understand the code i went step by step, i'm now having fun with locks for doors.
Here is my attempt to make my lock, using iterative instead of recursive (or vice versa? i'm declaring function instead so that i can make my own library, it's iterative no?)
Spoiler
it tells me that i need a end to close the while loop.
I tryed many things ut as far as i know i don't need an extra end...
What did i do wrong?
Thanks in advance.












