Hello
You currently have:
`change camera to target object 2 if shift is pressed
if shiftkey()=1
camtarget= 2
else
camtarget= 1
endif
`find x y z of camera target object
camtargetx = object position x(camtarget)
camtargety = object position y(camtarget)
camtargetz = object position z(camtarget)
`set cameraview
cameraview1()
`camera to view object 1 or 2
function cameraview1()
position camera camtargetx-12,camtargety+5,camtargetz
point camera camtargetx,camtargety,camtargetz
endfunction
ANd when you are trying to call your function, you are not passing it the variables it needs.
Change it to:
`change camera to target object 2 if shift is pressed
if shiftkey()=1
camtarget= 2
else
camtarget= 1
endif
`find x y z of camera target object
camtargetx = object position x(camtarget)
camtargety = object position y(camtarget)
camtargetz = object position z(camtarget)
`set cameraview
cameraview1(camtargetx,camtargety,camtargetz)
`camera to view object 1 or 2
function cameraview1(x,y,z)
position camera x-12,y+5,z
point camera x,y,z
endfunction
Hope I Helped...

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy