Integers with leading zeroes are interpreted as Octal (base-8)

Summary

Integers that have a leading zero are interpreted as Octal.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Assets

Steps to Reproduce

Hard code an integer with leading zeroes.

NUMBER : int = 013579

Print the number.

Print("{NUMBER}")

Expected Result

Output should show 13579 (base-10) per documenation: Int in Verse | Fortnite Documentation | Epic Developer Community

Observed Result

Output shows 751

Platform(s)

PC

Additional Notes

In octal (base-8), valid characters include 0-7. The 9 is being dropped, resulting in 01357 being evaluated as Octal:

0 * 8^4 + 1 * 8^3 + 3 * 8^2 + 5 * 8^1 + 7 * 8^0 = 751

In C / C++, 013579 would actually be a compile error (invalid digit "9" in octal constant).

Hi Jaden, I’ll get someone from the team to get their eyes on this.

FORT-972725 has been added to our ‘To Do’ list. Someone’s been assigned this task.