I know that...your testing is too good... That's the issue with (getstring)... now I've used a little trick with getkword... - you still can enter any character.
But still, if there is some <last choice>, you cannot simply type nothing and ENTER for NO-prefix option. - only if you get it empty like this <>, then you can hit ENTER. Otherwise type "None", or select "None".
BTW your formatted MTEXT attribute give me a little hard time - so don't change the format of text inside of MTEXT - you may loos a max value recognition (especially with no prefix). The format is a part of a string value, see "\\W0.7000;EG001" Actual value is bold.
(vl-load-com)
(defun c:<Test5 ( / *error* lay cmd :MaxAttValue :AddLeadingZeros txt)
(defun *error* (errmsg)
(if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break"))
(princ (strcat "\nError: " errmsg)))
(setvar 'CLAYER lay)
(setvar 'CMDECHO cmd)
(princ "\nLetzte Punktnummer gespeichert!")
(terpri)
(princ))
(defun :MaxAttValue (pre / mxm i en em val att)
(setq mxm 0)
(if (= pre "") (setq pre ";"))
(if (setq ss (ssget "_X" (list '(0 . "INSERT") '(2 . "SPI-Datenextraktionspunkt-CM") (cons 410 (getvar 'CTAB)))))
(repeat (setq i (sslength ss))
(setq en (ssname ss (setq i (1- i))))
(while (/= (cdr (assoc 0 (setq em (entget (setq en (entnext en)))))) "SEQEND")
(and (eq (cdr (assoc 0 em)) "ATTRIB")
(setq att (cdr (assoc 1 (reverse em))))
(vl-string-search pre att)
(setq val (substr att (+ 1 (vl-string-search pre att) (strlen pre))))
(setq mxm (max mxm (atoi val)))
))))
mxm)
(defun :AddLeadingZeros (a d / b) ;add zeros to 'd' many digits ;a string
(strcat (substr "000000000" 1 (if (>= d (setq b (strlen (itoa (fix (atof a)))))) (- d b) 0)) a))
; ------------------------------------------------------------------------------------------------------
(setq lay (getvar 'CLAYER)
cmd (getvar 'CMDECHO))
(setvar 'CMDECHO 0)
(command "_.-LAYER" "_m" "-I-Koordinatenpunkte" "_co" "3" "-I-Koordinatenpunkte" "")
(or *<test5-g*
(setq *<test5-g* "None"))
(initget 128 "U1 EG O1 None")
(setq *<test5-g* (cond ((getkword (strcat "\nGeschoss angeben [U1/EG/O1/None] <" *<test5-g* ">: ")))
(*<test5-g*))
*<test5-g* (if (= *<test5-g* "None")
""
*<test5-g*))
(setq *<test5-i* (1+ (:MaxAttValue *<test5-g*))
*<test5-i* (cond ((getint (strcat "\nPunktnummer angeben <" (itoa *<test5-i*) ">: ")))
(*<test5-i*)))
(while T
(command "_.-INSERT" "SPI-Datenextraktionspunkt-CM")
(princ (strcat "\nEinfügepunkt angeben für '" (setq txt (strcat *<test5-g* (:AddLeadingZeros (itoa *<test5-i*) 3))) "': "))
(command PAUSE "1" "1" "" txt "")
(setq *<test5-i* (1+ *<test5-i*)))
)