Arrays creating decimal place of a number from an array

Bugs will be moved here once resolved.

Post » Thu Jan 26, 2017 10:02 am

Hurray!!!!!! :D

We have done it!!! The code has worked in my full project and fixed the problem.

Thank you very much for your help @Burvey and @R0J0hound

R0J0hound your "Item"&str(Inventory.At(ItemId)) line of code has worked a treat.

Cheers All!!
B
4
S
1
Posts: 6
Reputation: 362

Post » Thu Jan 26, 2017 3:14 pm

I'm glad you got it sorted. I'm still curious about what is causing the issue in the first place (Why the lower numbers work as expected and the higher ones don't).
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Tue Jan 31, 2017 2:59 pm

I can confirm this bug. Here are my findings:

If I access 2 array datums in the same action (i. e. set text to Array.At(0, 0) & newline & Array.At(0, 1) & newline), then I get this error. If I access them one by one, however, and add some text at the end, then it works normally (according to comments here, I guess it's because then it converts it into a string).
Here's the number I'm having problems with, but I see that some (not all) other numbers cause problems as well: 1909769338

capx: http://www.filedropper.com/c2arraybug

By the way, round() expression doesn't work here.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Thu Feb 09, 2017 3:18 pm

This bug is problematic, as if you request a post with id 1909769338, it is ok, but if you request 1909769337.999998, you obviously get an error.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Thu Feb 09, 2017 5:53 pm

The bug is with the & operator when it converts a number to text. It's the rounding feature that was added to make decimal numbers print nicer that is causing the issue. It's not unique to array values, something like a variable can be used to cause it too.
B
91
S
31
G
103
Posts: 5,241
Reputation: 67,768

Post » Wed Feb 15, 2017 5:36 am

Hi , I'm new beginning for this site recommend I thank you for everything
B
2
Posts: 2
Reputation: 154

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest