There are two bugs in this script. One is that we have to copy content of table. We can use unpack for that. Second bug is that write_state is used in read_state but defined later on so it has to be moved.
There are two bugs in this script. One is that we have to copy content of table. We can use unpack for that. Second bug is that write_state is used in read_state but defined later on so it has to be moved.