Try this. The main problem was that you weren't recording any camera changes.
make object cube 1,250
make object cone 10,250
do
text 0,0,str$(CameraMode)
if CameraMode=0 then CameraMode=CameraFirst(CameraMode) else CameraMode=CameraThird(CameraMode)
loop
function CameraFirst(CameraMode as integer)
if upkey()=1 then Move camera 1
if upkey()=1 then Move object 10,1
if downkey()=1 then Move camera -1
if downkey()=1 then Move object 10,-1
if rightkey()=1 then yAng=wrapvalue(yAng+2)
if rightkey()=1 then playerYang=wrapvalue(playerYang+2)
if leftkey()=1 then yAng=wrapvalue(yAng-2)
if leftkey()=1 then playerYang=wrapvalue(playerYang-2)
if spacekey()=1 then CameraMode=1
rotate camera xAng,yAng,zAng
rotate object 10, playerXang, playerYang, playerZang
sync
endfunction CameraMode
function CameraThird(CameraMode as integer)
If Upkey()=1 then Move object 10,1
If Downkey()=1 then Move object 10,-1
If Leftkey()=1 then Yrotate object 10,Wrapvalue(playerthirdY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(playerthirdY#+5)
If controlkey()=1 then CameraMode=0
X# = Object position x(10)
Z# = Object position z(10)
cZ# = Newzvalue(Z#,playerthirdY#+180,10)
cX# = Newxvalue(X#,playerthirdY#+180,20)
Position Camera cX#,25,cZ#
Point camera X#,12,Z#
sync
endfunction CameraMode