You can't just change the type of a parameter and have things continue to work.
I assume that your goal is just to prevent someone from typing anything other than a number for that parameter? Can't totally understand what you're after.
Since that parameter is text - the code in the rest of the object is expecting text, and formatting it for output that way. If you change it to a number, then you need to change the output code to convert the number to a text string at that point. (In general, you need to search all of every script for the changed parameter and adjust code accordingly.)
A 'trick' to avoid so much code modification is to introduce a NEW numeric parameter and to hide (or lock) the text parameter ... and then in the Parameter Script, convert this new numeric parameter to text and store it in the text parameter for things to proceed as before.
Cheers,
Karl
One of the forum moderators
AC 28 USA and earlier • macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB