Forcing data to be saved as float
Hi there! I have this line:
$data modify entity @s data set value $(raw)f, and as you can see it has a macro that's copied from a book and quill. My problem is that if the player starts their string with a letter or something, the command still runs and saves it as i.e."hello245f". I instead need the command to simply fail if it contains anything other than characters accepted in a float. (Note that typing "123abc" fails the command, as123abcfdoesn't auto-save as a string)Is there any way around this?