I do not understand how is elevatorFloor, elevatorPos read - as far as I can see it defines one variable repeatedly. So in theory, as far as I can see, the initialisation procedure only stores the "last" elevatorFloor, elevatorPos read. If that is not the case, I still do not understand how to access the "other" elevatorPos'es (trying to access something like elevatorPos[i] returns an error, as elevatorPos is an integer, not an array).
I am aware that this is a very basic problem, but I would be very grateful if someone could help out. I'm using Python, if that changes anything - I wasn't changing the initialisation procedures at all.