whole lot of syntax errors there mart.

and balafrus' code is not kixtart at all.
"if exist blaah" just does not work.

and that printer mapping.
is there only one printer per room?
do the printers have proper names or do they differ totally from the naming schema?

I say this because like I said above, all you need is at most 5 lines of code if all of the info is here.
don't start coding too soon.
you can see what comes from it.
bad code

and mart, could you clean your code?
_________________________
!

download KiXnet