so, I think you are actually lacking the udf from your script itself.
right?

add the code of incontainer (everything from function keyword to endfunction) to your script.
does not matter what the place is.
many of us even use call or include to not directly place it in the script file.

but plug that code in and try again.
and, remember, it's udf, do not alter the code anyhow or anything.
it's a self-contained "subProgram", just add it in and forget that it's there.

for more about how to use udf's, see:
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=81594
_________________________
!

download KiXnet