Page 1 of 1

Dividing by fractions?

Posted: Mon Jun 03, 2013 1:52 pm
by GottaLove88s
Gents,

Will BA let me do this...

SetAttrib(id, "LOS", GetBaseAttrib(id, "LOS")/1.5) ;

Or is there an issue with dividing by non-integer values?

Re: Dividing by fractions?

Posted: Mon Jun 03, 2013 3:07 pm
by pipfromslitherine
The script doesn't understand floating point numbers. You would be best doing something like:

los = GetBaseAttrib...
los = 75 * los ;
los = los / 100 ;
SetAttrib...

Cheers

Pip

[edit: misread your maths]

Re: Dividing by fractions?

Posted: Tue Jun 04, 2013 7:34 am
by GottaLove88s
Thanks Pip,
Works a treat!
:-)