Ad Widget

Collapse

Possible little bug with UserParameter?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emx
    Junior Member
    • Aug 2006
    • 19

    #1

    Possible little bug with UserParameter?

    One of my UserParameter returns a value which is a percentage, calculated by a script.

    It's defined like this:
    UserParameter=vm.stats[*],cat vm-$1.txt

    My percentage is stored in vm-asr.txt

    The item using it uses the syntax vm.stats[asr]
    Since the item is a percentage it is between 0 and 1, so I use a 100 multiplier.

    It won't work... goes to "Unsupported".

    I changed the percentage calculation and multiplied by 100 in my script, and I removed the multiplier in the item.

    It now works.

    So, it looks like UserParameter won't work well if the float starts with a "." (e.g. .952 which means 0.952 which represents 95.2%). It does however work well if the number is stored by script as 95.2

    Probably a parsing bug?
Working...