Author Topic: None of my earlier working {EXP: condition} calculations are working. SOLVED!!  (Read 2895 times)

FireSammy

  • Newbie
  • *
  • Posts: 43
The subject line says it all.

EDIT: According to my tests it seems that clear number values are being calculated normally, but tokens are not, at least not DEC-tokens. For example:

21:01:43 - Decimal token could not be converted : {EXP: {DEC:Insurance Excess Set0,0375} * {DEC:Ship value} }

This works just fine: {EXP: 2 * 100 }  results 200
« Last Edit: October 14, 2018, 03:40:19 AM by FireSammy »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
You may want to look in this thread, as this has already been worked through (extensively):

https://voiceattack.com/SMF/index.php?topic=2129.0


What version of VoiceAttack are you using?

FireSammy

  • Newbie
  • *
  • Posts: 43
Thx for the link to the discussion and i see you guys have worked hard to get it solved.
My current VA version is v1.7.2

Just downloaded it and installed it. No change. I also tried the link provided at the end of the discussion there, but my win10 does not allow me to install it, saying: "This app can't run on your PC"

FireSammy

  • Newbie
  • *
  • Posts: 43
Oki, installed the latest BETA v1.7.2.24 version and no change. The problem remains the same.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
{EXPDECINV} did not work for you at all?  Have you looked over the help doc on the {EXPDECINV} token?

FireSammy

  • Newbie
  • *
  • Posts: 43
O M G .....  ??? I have so many of these EXP calculations in there, so u sayin i need to change all of the {EXP:s} to {EXPDECINV:}... Argh LOL

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
You can always export your profile to a .vap, open it in notepad, find and replace all {EXP with {EXPDECINV, save and then import it again.  Make sure you back up your original, tho.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
I'm curious as to how it all just stopped working.  Did something change on your system?

FireSammy

  • Newbie
  • *
  • Posts: 43
Sorry to inform you, the changes did not help after first tests. Everything remains the same  :(

23:00:03 - Decimal token could not be converted : {EXPDECINV: {DEC:Insurance Excess Value0,0375} * {DEC:Ship value} }

No changes other than normal updates for app's and OS. Well the recent win10 updates have been quite big of course.

FireSammy

  • Newbie
  • *
  • Posts: 43
Oki did some further testing. This is getting a bit tricky now. In case you set a decimal with 1 or more decimal places -it will make the "cultural dot change" to the value. To output it into log and/or use it in the EXP, this {DEC:value} needs to be used with {DECINV:value}. If no decimal places, then can be used as normal DEC.

If the {EXP: values} typed are having dots, it will need to be used with the {EXPDECINV: values}

And i'm not even sure i got this thing understood correctly. Anyways this will be one grind to get all triple check'd Argh LOL :o

Edit: At least this way i got one of my commands calculations all working as they should, huh
« Last Edit: October 13, 2018, 02:52:44 PM by FireSammy »

FireSammy

  • Newbie
  • *
  • Posts: 43
I would humbly suggest you could make a "cultural dot on/off -selection box" into all functions that may create dots into numerical values/tokens (edit: or even into the general or advanced settings/options panel) -IF possible, cheers ;)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Have you tried using just decimal variables to do what it is you are doing instead of text expressions?

FireSammy

  • Newbie
  • *
  • Posts: 43
Yeas a couple for tests. Worked just fine. The named decimal values/tokens that are retrieving values from a plugin (EDDI) -are the problem. They are very important and i cannot get the values from anywhere else nor with any other method. Most of my EXP: calculations involve DEC variables with different names on. Sorry i cant explain better.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
If you have a culture setting that uses "," as the decimal separator, you need to use the "INV" variants of all tokens.

E.G.
Code: [Select]
Set decimal [testDec] value to the converted value of {EXPDECINV: {DECINV:Insurance Excess Value0,0375} * {DECINV:Ship value} }


"{DEC:}" can work coincidentally because a decimal value containing a whole number is rendered as if it's an integer(E.G. 1,0 is rendered as "1"), but unless you're using decimals to only store integers that don't fit in an actual integer value, it's not a substitute for "{DECINV:}".


As Gary suggested already, you can export your profile as a .vap, use a text editor to find and replace "{EXP:" with "{EXPDECINV:" and "{DEC:" with "{DECINV:", then import it again.

FireSammy

  • Newbie
  • *
  • Posts: 43
Very good sir and i humbly thank you and Gary for your attention. I will try to work on my fuel calculation command string, because it has the most EXP: calculations out of all my similar commands. Just opened VA and the plugin has a new update too, so hoping to get these done soon.

Like i informed before, at least i got the first command string fully working with earlier advice. Will try to simply replace all points as suggested first, thumbs up LOL

EDIT: WORKING GREAT!!! WOHOO LOL!!! Fantasticoo!! ;D
« Last Edit: October 14, 2018, 03:33:39 AM by FireSammy »