A few comments
X is the shortcut for Explode I always type a shortcut like this to see if it exists. Use say "XX" & "YY".
I would use '"Layer" "M" as it makes the layer if it does not exist, also sets it current.
Use Comand-s for the xline it will ask for more details or just make your command correct by completing the requests when running XLINE.
(command "xline" "H" (getpoint "\nPick point ") "")
(command "xline" "V" (getpoint "\nPick point ") "")
When making a lisp always look at the manual version, write the prompts down on a bit of paper.