Either you're not showing us one contiguous script or you don't understand how UDFs work.

The line:
Call "isiniprange.udf"
reads in to memory the UDF definition from the external file "isiniprange.udf". Why would you call it twice in one script?

The line:
servicepack
invokes the UDF defined between "Function" and EndFunction" lines which you don't show in the script or call from any external file.

You show two identical lines:
Function ServicePack()
but not the rest of the code or the EndFuction so not sure what is going on there.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.