OK So it you might have made something like this if you got it to work:
(defun c:testthis ( / spt1 spt2 roomname a b c d scpt1 mywidth myheight) ;; after the '/' are local variable names
(setq ;;setq: Tells LISP you are setting a variable
spt1 (getpoint "\nPick the first point") ;;should be obvious what this does
spt3 (getcorner "\nPick the next corner" spt1) ;;should be obvious what this does
roomname (getstring "\nEnter Room Name: " T) ;;T allows spaces, else space acts as a return
a (if (< (car spt1)(car spt3))(car spt1)(car spt3)) ;;Lower Left X coord car gives first item in a list, here x coord
b (if (> (car spt1)(car spt3))(car spt1)(car spt3)) ;;Upper Right X coord
c (if (< (cadr spt1)(cadr spt3))(cadr spt1)(cadr spt3)) ;;Lower Left y Coord cadr gives second item in a list, here y coord
d (if (> (cadr spt1)(cadr spt3))(cadr spt1)(cadr spt3)) ;;Upper Right Y Coord
)
(setq mywidth (abs (- a b))) ;;abs for absolute value (witohut = or -), (- is subtract
(setq myheight (abs (- c d)))
;;center points
(setq scpt1 (list (/ (+ a b) 2) (/ (+ c d) 2)) ) ;;create a coordinate which is a list (/ for divide (+ for add
(command "mtext" scpt1 "J" "MC" scpt1 (strcat roomname "\n" (rtos mywidth 2 2) " x " (rtos myheight 2 2 )) "")
;;Command echos what you'd type in command line, anything in "" is a fixed value in else it is calculated
)
Put a few notes in if you want to learn how it does what it does