Hi I just tried again and its downloaded fine this time, weird. The new copy ive made seems to be working better as it compiles and uploads and now when I run a g29 it doesn't do the annoying servo retract every move but at the end the nozzle stays above the bed and cant be moved down to touch it, it actually raises the nozzle a fraction and shows as being at 0. Im using the probe as a z endstop so do I need to change M206 offset? The last code I tried using added the two together so if both had an offset it would double the distance.
The other thing is the n parameter doesn't seem to have any effect, it always does 3x3 although it moves around in a different pattern. Ive copied the output from the bed level matrix and topology map for you if that is of any help? Might be best to just leave the old copy alone as its a bit of a mash-up of different code. Sorry if i've wasted any of your time.

22:07:11.001 : Bed Level Correction Matrix:
22:07:11.009 : 0.999997 0.000000 0.002244
22:07:11.009 : 0.000000 1.000000 0.001029
22:07:11.009 : -0.002244 -0.001029 0.999997
22:07:11.312 : echo:endstops hit: Z:-0.40
22:08:14.532 : N180 G28 X0 *114
22:08:15.940 : N182 G28 Y0 *113
22:08:20.974 : N184 G28 Z0 *116
22:08:34.858 : N190 G29T0 *94
22:09:58.962 : Eqn coefficients: a: 0.00 b: 0.00 d: -1.02
22:09:58.962 :
22:09:58.966 : Bed Height Topography:
22:09:58.966 : --0.08199 +0.11606 +0.31254
22:09:58.970 : --0.27027 --0.05777 +0.11606
22:09:58.970 : --0.14293 --0.02691 +0.03520
22:09:58.970 :
22:09:58.974 : planeNormal x: -0.00 y: -0.00 z: 1.00
22:09:58.974 :
22:09:58.974 : Bed Level Correction Matrix:
22:09:58.978 : 0.999997 0.000000 0.002283
22:09:58.978 : 0.000000 1.000000 0.001003
22:09:58.982 : -0.002283 -0.001003 0.999997
22:09:59.285 : echo:endstops hit: Z:-0.40
22:10:43.899 : N213 M81 *58

p.s Is there anyway to have the nozzle lift before the servo retracts at the end of G28 and G29? A few other people wanted the same thing and i'd tried using some of their code which might have caused me these problems in the first place. Thank you again for all the help.