Since the existing width factor could be any value greater than 1.0, you'll need to acquire the existing value for use within the subst expression, e.g.:
(defun c:fixtw ( / i s x )
(if (setq s (ssget "_X" '((0 . "TEXT") (-4 . ">") (41 . 1.0) (410 . "Model"))))
(repeat (setq i (sslength s))
(setq i (1- i)
x (entget (ssname s i))
)
(entmod (subst '(41 . 1.0) (assoc 41 x) x))
)
)
(princ)
)
Aside, I'm unsure why you are changing the structure of the function for use in an AutoCAD Script - I would suggest saving the above function to an AutoLISP file located in a trusted support path, and then loading & evaluating it from your Script using something like the following:
(load "fixtw.lsp" nil) (if c:fixtw (c:fixtw))