However, you only provide two parameters into the function. See your own code
code:
mapprinter($PRServer,$PrinterName)

. The last two REQUIRED parameters are NOT provided, though you've declared varables for them.
_________________________
There are two types of vessels, submarines and targets.