Page 1 of 1

Strinrequest #NUMBERICAL to return number instead of string

Posted: Mon Nov 16, 2026 2:10 pm
by Bugala
amount = StringRequest("How many to display?", "dont know how many", 100, #NUMERICAL)
If amount > 100 Then DebugPrint("over 100")

error: Attempting to compare a string with a number

Easy to fix by using ToNumber(Amount), but I wonder if it would make sense to return number instead of a string when using #NUMERICAL?

Re: Strinrequest #NUMBERICAL to return number instead of string

Posted: Thu Nov 19, 2026 6:12 pm
by airsoftsoftwair
Bugala wrote: ↑Mon Nov 16, 2026 2:10 pm Easy to fix by using ToNumber(Amount), but I wonder if it would make sense to return number instead of a string when using #NUMERICAL?
Not really possible because it would break compatibility with older scripts...