Kumalix:
If i plug the A0 directly to ground the value is 1023. (All other pins unplugged). This should be 0 (zero) right?
Yes, unless the wire is broken, or you route it over some breadboard with bad pins or interrupted power rails.
We need to see a REAL picture of the setup, and very simple/short code that you use with it.
99.99% of problems here is user error.
Leo..