Only had a quick moment to look at your coding, however, I noticed that you had a few spaces in it where there shouldn't be.
Try this:
[Prox]^c^c(setq player (getvar "clayer"));-layer;s;device;;-insert prx-no.dwg;\1;;\(setvar "clayer" player);