Strinrequest #NUMBERICAL to return number instead of string

Feature requests for future versions of Hollywood can be voiced here
Post Reply
Bugala
Posts: 1446
Joined: Sun Feb 14, 2010 7:11 pm

Strinrequest #NUMBERICAL to return number instead of string

Post 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?
User avatar
airsoftsoftwair
Posts: 6034
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Strinrequest #NUMBERICAL to return number instead of string

Post 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...
Post Reply