User Tag List

Results 1 to 3 of 3

Thread: Negative Numbers bug

  1. #1
    Clicker Fusion 2.5

    Join Date
    Sep 2010
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Negative Numbers bug

    I have a stats calculator in my program. It uses 4 counters per stat. The counters are named (depending on stat):
    current
    add
    subtract
    total

    The current counter receives its value from an edit object
    The add and subtract counters get theirs from altered global values named after themselves.
    The formula I entered into total counter is like this:

    Set counter to [color:#3333FF]value[/color]( [color:#6666CC]"current"[/color] )+[color:#3333FF]value[/color]( [color:#6666CC]"Add"[/color] )-[color:#3333FF]value[/color]( [color:#6666CC]"Subtract"[/color] ).

    This means that the total counter may receive a negative value at some point, but when it is supposed to I want it to display a negative symbol and it does not for any negative values. For instance:

    Global Value A is set to -5, and the subtract counter is supposed to receive this value. However it only receives 5 (not -5). I rearrange the events and formula to:

    Set counter to [color:#3333FF]value[/color]( [color:#6666CC]"current"[/color] )+[color:#3333FF]value[/color]( [color:#6666CC]"Add"[/color] )+[color:#3333FF]value[/color]( [color:#6666CC]"Subtract"[/color] )

    to compensate for the negative symbol not showing in the counter, and it successfully subtracts but still does not show a negative symbol.

    All counters' values are set as follows:

    initial value = 0
    minimum value = -9999
    maximum value = 9999

    Is there a way for me to force a negative symbol to appear if the total counter goes below zero?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Negative Numbers bug

    Does the on-screen counter show a negative number if you set it directly? It would help to identify if this is a problem with the display of the counter, or with the formula used to get the result.

    Does the counter show the correct value if you open it in the debugger? Is the counter perhaps not physically wide enough to display the minus sign, or (if a Numbers counter) has a minus sign animation frame that's blank?

  3. #3
    Clicker Fusion 2.5

    Join Date
    Sep 2010
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Negative Numbers bug

    If I set initial value to a negative number it does

Similar Threads

  1. Problem returning a Negative Numbers
    By EZubby in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th July 2011, 05:56 AM
  2. converting negative numbers to 1
    By Aikikame in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th October 2010, 05:38 PM
  3. how to make masked edit support negative numbers?
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd March 2010, 10:22 AM
  4. how to make masked edit allow negative numbers?
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th February 2010, 05:02 PM
  5. can masked edit object support negative numbers?
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 11th October 2009, 04:06 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
  •