Photoshop CS4 setting properties to understand a variable

I am not sure why Photoshop will not compile the properties using the variable for docHeight and docWidth instead of actual digits?
Can anybody help me out?

tell application "Adobe Photoshop CS4"
	activate
	set thisdoc to current document
	tell thisdoc
		set docHeight to height of thisdoc
		set docWidth to width of thisdoc
		set docHeight to docHeight as text
		set docWidth to docWidth as text
		try
			try
				change mode to RGB
			end try
			set My_Sampler to make new color sampler with properties {class:color sampler, position:{1, 1}}
			set My_Values to color sampler color of My_Sampler as list
			set R to text item 2 of My_Values as integer
			set G to text item 3 of My_Values as integer
			set B to text item 4 of My_Values as integer
			delete My_Sampler
			
			------->>>>
			--This is where my error happens. I can't assign the position to recognize the variables as input numbers?
			
			set My_Sampler2 to make new color sampler with properties {class:color sampler, position:{docHeight, docWidth}}
			set My_Values2 to color sampler color of My_Sampler2 as list
			set R2 to text item 2 of My_Values2 as integer
			set G2 to text item 3 of My_Values2 as integer
			set B2 to text item 4 of My_Values2 as integer
			delete My_Sampler2
		end try
	end tell
end tell

tell application "Finder"
	set RGB to (R + B + G)
	--This works
	display dialog RGB & " This is the value of the addition of R,G,B" as string
	--This does not
	set RGB2 to (R2 + B2 + G2)
	--end try
	display dialog RGB2 & " This is the value of the addition of R2,G2,B2" as string as string
end tell

Why are you coercing them to text?

You are correct, I didn’t need to.
btw, I just realized my error. I need to subtract 1 from both the height and the width to get the bottom right pixel.
This will work.

tell application "Adobe Photoshop CS4"
	activate
	set thisdoc to current document
	tell thisdoc
		set docHeight to height of thisdoc
		set docWidth to width of thisdoc
		
		
		try
			try
				change mode to RGB
			end try
			set My_Sampler to make new color sampler with properties {class:color sampler, position:{1, 1}}
			set My_Values to color sampler color of My_Sampler as list
			set R to text item 2 of My_Values as integer
			set G to text item 3 of My_Values as integer
			set B to text item 4 of My_Values as integer
			delete My_Sampler
			
			------->>>>
			--This is where my error happens. I can't assign the position to recognize the variables as input numbers?
			
			
			
			set My_Sampler2 to make new color sampler with properties {class:color sampler, position:{docWidth - 1, docHeight - 1}}
			set My_Values2 to color sampler color of My_Sampler2 as list
			set R2 to text item 2 of My_Values2 as integer
			set G2 to text item 3 of My_Values2 as integer
			set B2 to text item 4 of My_Values2 as integer
			delete My_Sampler2
		end try
	end tell
end tell