Why do you use mtl.skill1? Use my.skill1 directly in your mtl_terr_view() function. That should be all.

And for scaling use floatr(), not floatd().