VoooDooCheese's Recent Forum Activity

  • Hurray!!!!!!

    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!!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Fantastic!!! I have had a look in the test Capx also and success!!!

    I will add it into the code for my full project, Fingers Crossed.

    il keep you up to date

  • Yeah its really bizarre that 3710100102 through 3710100106 are working correctly but the 0-1 and 7-9 acquire the decimal places

  • Thank you again but alas im afraid still no luck the decimals are still coming through even with "Item"&StartArray.At(round(ItemId))

  • Thanks for the idea Burvey, but unfortunately I have tried with the system expressions like this, "Item"&floor(StartArray.At(ItemId)), "Item"&ceil(StartArray.At(ItemId)), and "Item"&round(StartArray.At(ItemId)). (Im assuming these are correct.)

    Which i would have thought would eliminate the odd decimals that are occurring which it what leads me to believe this could be a bug

  • Problem Description

    When taking a number out of an array and adding a prefix and placing the number into another array the resulting number will receive a decimal point.

    The numbers i am working with are a 10 digit number with values representative of an id. the first 2 digits are the item and the following are the information. All the way up to 3699999999 works without issue and the results are correct. Around 3710100100 the numbers act oddly once they are put from one array to the other while adding the needed "item" prefix.

    i have created a Capx with the findings and the steps to recreate the bug.

    i am using this bit of code to add the information to the new array

    Parameters for new array: Set at XY

    X= ItemId

    Y=0

    Value="Item"&StartArray.At(ItemId)

    some help on this would be fantastic as this is the final available item and i would like to not cut it from the game.

    Attach a Capx

    https://www.dropbox.com/s/9zple3tgc8wm5 ... .capx?dl=0

    Description of Capx

    This Capx is a recreation of the bug i have come across while working with arrays in a larger game.

    All of the ItemIds work correctly except for the numbers in 3710100101 range.

    The results and findings can be found and replicated in the capx file.

    Steps to Reproduce Bug

    • Step 1 Run the project in debug mode. (To make the arrays more visible and easily accessible press the eye button to watch the array data for each array and then use the watch Tab.)
    • Step 2 Press either the "1" or the "2" button on the keyboard. ("1" will load the starting array with numbers that are problematic) ("2" Will load the starting array with numbers that work with no problems.
    • Step 2 Press the "t" button on the keyboard to activate the function that transfers the information to the new array.
    • Step 3 Check the values in the arrays and see the difference in the numbers. ("Start array" is the original values, "new array" is the ones with the "item" prefix)
    • Step 4 The values can be changed in the Event sheet to test further if need be.

    Observed Result

    The numbers recieve deciamls

    e.g.

    3610100101 becomes "item3610100101" Which is correct

    3710100100 becomes "item3710100099.9999995" which is incorrect

    3710100101 becomes "item3710100101.0000005" incorrect

    interestingly with the same string using the same code these numbers work fine;

    3710100102,

    3710100103,

    3710100104,

    3710100105,

    3710100106,

    but these following ones will also become decimals again.

    3710100107 becomes "item3710100106.9999995" which is incorrect

    3710100108 becomes "item3710100108.0000005" which is incorrect

    3710100109 becomes "item3710100109.0000005" which is incorrect

    Expected Result

    All the numbers should directly transfer without adding mystery decimals.

    3710100101 becomes "item3710100101"

    3710100102 becomes "item3710100102"

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (not tested)

    Operating System and Service Pack

    Windows 10 Pro

    Construct 2 Version ID

    R239 (64bit)

VoooDooCheese's avatar

VoooDooCheese

Member since 21 Mar, 2015

None one is following VoooDooCheese yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies