As I supposed, these are C-Script related errors. Dumb me, now that you posted them, I can spot them so why couldn't I before?

First of all, do as Steempipe said. Secondly, pay special attention to
Code:
effect = "bablablabl";
since the "=" was missing in your code. Steempipe also wrote "bmap_to_cubemap(mtl.skin1);" where you obviously forgot the "a", resulting in bmp_to_cubemap etc.
Have a look for those small mistakes, they can screw up your whole script. Other than that, it looks as if it should be working
