Before the "switch" statement, you need declarations:
object oHolder;
object oPlaceable;
Then you can refer to oHolder and oPlaceable in cases.
NWScript is normally tolerant of declarations in the body of the code, but switch is an exception. Some coders prefer to declare all variables at the start of the module anyway, so that the scope of the variables is clear.