Only one more thing I can think of, and that is that for whatever reason, height might be returning an array.
Change the diag_log line to this.
Code:diag_log format ["[DZMS]: DEBUG: Pos:[%1,%2] / noWater?:%3 / okDistance?:%4 / TaviHeight:%5", _posX, _posY, _noWater, _okDis, str(_tavHeight)];
Here you go Vampire
http://pastebin.com/Zvna288n