CalcBuilder Forum

Problem with the results.

User moon_1091 2013-06-03 22:44:35

Hello,
I'm not a programmer, hence the apparent simplicity of the formula. It works but when I enter a higher data calculator go wild and show 0.
I do not know what I'm doing wrong.
I would be grateful for any clue.

$result_0=$input1*$input2;
$result_1=$input4*365*$igd;
$result_2=$result_1*$input2*$input3*0.001;
$result_2=number_format($result_2,0);
$result_3=$result_1*$result_0*$input3*0.001;
$result_3=number_format($result_3,0);
$result_4=$input5*$result_2;
$result_4=number_format($result_4,0);
$result_5=$result_3*$input5;
$result_5=number_format($result_5,0);
$result_6=$result_4-$result_5;
$result_6=number_format($result_6,0);

thank you in advance
Rodia

Moonsoft support 2013-06-04 09:00:07

Hello,
your code seems to be ok. If your calculator behaves strange only with high numbers, the reason could be the decimal format applied. Please double check your preferences at the calculator backend, to ensure you have set the decimal and thousand separator you need to allow at the front-end.
If you can't get it working, please let us know which decimal and thousand separator are you using, and which is the input you enter at the calculator that it's not working properly.

Thanks, regards

User moon_1091 2013-06-04 10:38:14

Thank you for your quick reply and help
Now everything runs smoothly.
One more question? How to set up warning "Value must be between %s and %s" . I can see not values only %s signs in spite of they are set in the calculator backend

kind regards

Moonsoft support 2013-06-04 13:15:58

Hello,

It seems to be a bug in our packager. Please download latest version from customer area and check it again.

Sorry for inconveniences. Regards,

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!