I put a series of breaks in your function so you can check the values of your variables that are holding the frame counts. It should give you an idea of where something is going wrong in terms of the frame value.
Function Load_Stick(id)
Set DIR "Sticks"
load object "idle1.x",id
Idle(id,0)=1
Idle(id,1)=total object frames(id)
break "Idle id,1 = "+ str$(idle(id,1)) + "press ESC"
append object "walk1.x",id,Idle(id,1)+1
Walk(id,0)=Idle(id,1)+1
Walk(id,1)=total object frames(id)
break "Walk id,1 = "+ str$(walk(id,1)) + "press ESC"
append object "grab.x",id,Walk(id,1)+1
Grab(id,0)=Walk(id,1)+1
Grab(id,1)=total object frames(id)
break "Grab id,1 = "+ str$(grab(id,1)) + "press ESC"
append object "grab idle.x",id,Grab(id,1)+1
GrabIdle(id,0)=Grab(id,1)+1
GrabIdle(id,1)=total object frames(id)
break "GrabIdle id,1 = "+ str$(grabidle(id,1)) + "press ESC"
Set DIR ".."
endfunction
Also instead of line that read like
append object "grab idle.x",id,Grab(id,1)+1
try creating another variable out of the array + 1 . The parser that reads the append object command may be interpretting the + operator as something strange:
gid=Grab(id,1)+1
append object "grab idle.x",id,gid
Enjoy your day.