Log in

View Full Version : Multiply Symbol?



Littellj
04-01-2012, 04:55 PM
What is the mutliply symbol for Simba?

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

into

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

Assuming * is the multiply symbol.

Frement
04-01-2012, 05:45 PM
* is the multiply symbol.

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

Littellj
04-01-2012, 06:29 PM
I get a type mismatch when i do that.

Imagine
04-01-2012, 06:36 PM
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.

Home
04-01-2012, 06:42 PM
XPGain as integer or you need to Round it.

~Home

putonajonny
04-01-2012, 07:00 PM
[SIMBA]XPGain := Round((CurrentXP - OriginalXP) * 0.85);[SIMBA]

Littellj
04-01-2012, 11:53 PM
Thanks guys, I had thought that but didn't know how to do it.