User Tag List

Results 1 to 6 of 6

Thread: The results are shown as integers and floats in different environments

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)

    Join Date
    Sep 2019
    Posts
    63
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Exclamation The results are shown as integers and floats in different environments

    The results are shown as integers and floats in different environments

    This is a repeat!
    In the android emulator, the result is an integer, which is what I want;On an android device, the result appears as a floating point, and it squeezes out my not-too-short button box, which is not what I want!

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,715
    Mentioned
    251 Post(s)
    Tagged
    3 Thread(s)
    I don't see how this could be possible. Please post a MFA that shows this problem.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)

    Join Date
    Sep 2019
    Posts
    63
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Found the attachment too large, but that's ok
    The duplicate file mainly displays the results of this formula in text:
    "Test:" + Str$(((15960 * 1.0) / 99 * 10000) / 10)

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,715
    Mentioned
    251 Post(s)
    Tagged
    3 Thread(s)
    The result of ((15960 * 1.0) / 99 * 10000) / 10 is a floating point number, equal to 161212.12121212. There is no reason why it would give an integer value in the emulator (unless there is a bug in the emulator but I doubt it very much and in this case we are not responsible of the bugs in the Android emulator . Make sure you are testing the same app on the device and in the emulator.

    You said "In the android emulator, the result is an integer, which is what I want;", but your expression gives a floating point number as it contains floating point values. If you want an integer, either remove the floating point value from your expression and change the order of the member to get a correct result, like (15960 * 10000) / 99 / 10, or convert the result to an integer with either the Int or Round functions: Round(((15960 * 1.0) / 99 * 10000) / 10).

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)

    Join Date
    Sep 2019
    Posts
    63
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I solved the problem of displaying floats on android devices by rounding them.
    But it does show up 161212 in my android emulator, and if you're free and want to check it out, I tried uploading this replica mfa again.


    The file named "mianhuat-test.mfa" is in my upload database. I wonder if you can see it!
    Attached files Attached files

  6. #6
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,655
    Mentioned
    281 Post(s)
    Tagged
    4 Thread(s)
    mm strange i run here in two different emulator device and have theh same results as the runtime in devices
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Similar Threads

  1. Global Value Floats Keep Resetting To Integers
    By grimmy in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 19th December 2018, 10:52 AM
  2. apk does not build when using GPG Connector Object and no errors shown
    By Nadapp in forum Android Export Module 2.5
    Replies: 14
    Last Post: 22nd June 2017, 07:15 AM
  3. Retrieve counter string - gives exact value but not value shown.
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th February 2014, 06:50 PM
  4. [RC1 bug] Hi-Score predefined values aren't shown on mobile
    By qenio in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 30th October 2012, 11:07 AM
  5. destructible environments
    By jhonson in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th June 2009, 08:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •