It would be really nice if you attached the screenshot with the error so I can better debug. I have no way of testing the code, so it is really necessary.
PS: I edited my answer for better error avoidance and checking.
It would be really nice if you attached the screenshot with the error so I can better debug. I have no way of testing the code, so it is really necessary.
PS: I edited my answer for better error avoidance and checking.