You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the script editor, selecting an expression and pressing the shortcut for Evaluate Selection does just what the name suggests, e.g. selecting 10+24 will transform the selection into 34. However, for larger numbers, or any number where you put underscores for readability, e.g. 500+10_000, all characters starting from the underscore are ignored, which results in 510 instead of 10500.
Steps to reproduce
Type an expression in the script editor, with one number containing an underscore.
Press the Evaluate Selection shortcut (or select it from the context menu).
The result will not consider any characters after the underscore and will simply remove them.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
This is a limitation in the way this class parses things, it's very basic, in the same way "1_000".is_valid_int() returns false, and that's where things would need to be improved for this to work
But this is quite an advanced part of formatting
Will make a PR to document the fact that the string methods do not support this formatting
Tested versions
v4.3.1.rc.custom_build [d40fc50]
4.4 on latest master
System information
Godot v4.3.1.rc (d40fc50) - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Wed Aug 7 16:19:28 UTC 2024 - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7900 XT (RADV NAVI31) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)
Issue description
In the script editor, selecting an expression and pressing the shortcut for Evaluate Selection does just what the name suggests, e.g. selecting
10+24
will transform the selection into34
. However, for larger numbers, or any number where you put underscores for readability, e.g.500+10_000
, all characters starting from the underscore are ignored, which results in510
instead of10500
.Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: