Converting Vector to Integer

What exactly are you trying to achieve?

It’s very hard to follow what you did / are trying to do and it’s therefore rather hard to help you.