I think you've missed a lot of advanced terrain setup stuff:
make object terrain 1 ` create the terrain object
set terrain heightmap 1, heightmap$ ` set the heightmap
set terrain scale 1, tersize, tersize/4.0, tersize ` set the scale
set terrain split 1, 32 ` split value by 16 * 16
set terrain tiling 1, 8 ` detail map tiling
set terrain light 1, 1, -1, -1, 1, 1, 1, 0.7 ` light - xdir, ydir, zdir, red, green, blue, intensity
set terrain texture 1, 1, 2 ` base and detail texture
build terrain 1
update terrain
And without it, I think it's trying to use the older terrain system. That's not a good example, you should be able to get a decent example of advanced terrain, just showing you the AT setup stuff so you know what to look for.