Results 1 to 7 of 7

Thread: Multiply Symbol?

  1. #1
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Multiply Symbol?

    What is the mutliply symbol for Simba?

    I want to make
    Simba Code:
    XPGain := (CurrentXP - OriginalXP);

    into

    Simba Code:
    XPGain := ((CurrentXP - OriginalXP)*.85);

    Assuming * is the multiply symbol.

  2. #2
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    * is the multiply symbol.

    So:
    [SIMBA]XPGain := ((CurrentXP - OriginalXP) * 0.85);[SIMBA]
    There used to be something meaningful here.

  3. #3
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I get a type mismatch when i do that.

  4. #4
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm not positive, but did you declare XPGain as an integer? You might need to declare it as an extended value so you can store decimal places because 0.85 is not always going to give you an integer answer when you multiply it by something else.

  5. #5
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    XPGain as integer or you need to Round it.

    ~Home

  6. #6
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    [SIMBA]XPGain := Round((CurrentXP - OriginalXP) * 0.85);[SIMBA]

  7. #7
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys, I had thought that but didn't know how to do it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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