The issue is that you are doing the operation with two int32 and then converting to int64: StaticCast<int64>( (int32 + int32) ). You need to do the operation between an int32 against int64 so the number doesnt overflow.
EDIT: We have to convert from int64 → text → string because the the only function in KismetTextLibrary.h that takes int64 as parameter is static FText Conv_Int64ToText(...).
Thanks for this.
Do you happen no know why this produces values like this, it seems like if it’s above max in32 it doesn’t work and it returns -2147483648
There’s an overloaded 64 version and I think it’s calling it but it also has the same issue, I tested in C++, I changed TruncToInt with TruncToInt64 and it worked, I think it’s a bug.
Oh you’re fine, you provided the correct location of where the issue might be. I think I’ll submit a bug report unless someone else provides a good explanation of this behavior.