Share feedback, ideas and get community help

Updated 5 months ago

Error on SetVariable as a number

At a glance

The post indicates that the community member is experiencing an issue when trying to send a variable with a number, resulting in a wrong value being returned. The comments provide an explanation for the issue - in JavaScript, a number starting with a leading zero is interpreted as an octal (base-8) number, and any digit greater than or equal to 8 in an octal number is invalid. The community members discuss a fix for the issue, with one member stating that they have pushed a fix that will be available in 10 minutes. Another community member suggests using quotes as a good alternative.

When I try sent a variable with a number I got a return of a wrong value:
Attachment
image.png
B
V
m
6 comments
Thank you for the report!
I'll see how I can fix this
To explain what's up here:

In JavaScript, when a number starts with a leading zero (0), it is interpreted as an octal (base-8) number.

In octal representation, the digits range from 0 to 7. Therefore, any digit in an octal number that is greater than or equal to 8 would be invalid. In this case, the digit 8 in the number 03305273127 makes it an invalid octal number.

JavaScript automatically converts invalid octal numbers to decimal (base-10) numbers. So, 03305273127 is treated as a decimal number and is evaluated to 454391383.
I just pushed a fix (available in 10 min). Thank you again for the report!
Use quotes.
Attachment
image.png
is a good alternative 👍🏻 , but I test today and already is fixed the error.
Add a reply
Sign up and join the conversation on Discord