The terrain expects a detail map on the second skin. So either you can switch that feature off with

Code:
function main()
{
   detail_size = 0;
... 


or, use a third skin for your terrain, then you can switch it by setting my.skin to 1 or 2.