im assuming that that snippet is in the do-loop? because if its not then it wont work.
but assuming that it is....
it depends if ur using dbc or dbp
but assuming just in case that its dbc....
try
"
do
if upkey()=1 then move object 1,10
if downkey()=1 then move object 1,-10
set camera to follow object position x(1),object position y(1),object position z(1),*depending on size of object*100,*<*10,0,1
loop
"
this will work, but it doesnt support any strafing or such for when you get later in development, then you have to use math!! unless you are using dbp but u didnt specify... so... if i didnt answer your question tell me.
"geez, its probably a noobish mistake too!"