NXLS Script returns bad sum values
-
Hello guys,
I have one question about scripting in NetXMS. I wrote script, which simply sum three values and return this result.
val1 = GetDCIValueByDescription ...
val2 = GetDCIValueByDescription ...
val3 = GetDCIValueByDescription ...return val1 + val2 + val3;
When I return val1 or val2 or val3 it returns right number, but when I sum these values, it returns negative incorrect value.
For example val1 = 200.50 val2 = 700.56 and val3 = 1500. When I sum it, it returns -1400 ... That's very strange ...
I thought it could be due to overflow of float value, but somehow it works correctly on different servers with higher values.Any idea how to solve this or debug this?? Thank you in advance
-
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login