Author Topic: Set a decimal value with a variable with colon  (Read 897 times)

Pannam

  • Newbie
  • *
  • Posts: 14
Set a decimal value with a variable with colon
« on: November 23, 2020, 06:39:38 AM »
How can I set a decimal value to a variable like this?

SIMCONNECT!GENERAL ENG FUEL PUMP ON:1

I get an error, Variable names may not contain colons if not contained within a token.

I did try using tokens but keep running into some sort of error. Can you simplify the steps?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Set a decimal value with a variable with colon
« Reply #1 on: November 23, 2020, 06:46:18 AM »
As the documentation for that third-party product explicitly states, you need to use the '!' character where you would normally use the ':' character.

Pannam

  • Newbie
  • *
  • Posts: 14
Re: Set a decimal value with a variable with colon
« Reply #2 on: November 23, 2020, 08:41:46 PM »
Yes Sir! When I use the GetValue function, I do get the correct decimal values, It doesn't work when I use SetValue though.

This variable has two semicolons

SIMCONNECT:GENERAL ENG FUEL PUMP ON:1

This is what I have changed it to
SIMCONNECT!GENERAL ENG FUEL PUMP ON!1

Pannam

  • Newbie
  • *
  • Posts: 14
Re: Set a decimal value with a variable with colon
« Reply #3 on: November 23, 2020, 09:08:43 PM »
just an update:

I tried using LOCAL VARIABLE and SIMCONNECT, it just won't work. When switched to variable of FSUIPC, it worked without any problems.


Pannam

  • Newbie
  • *
  • Posts: 14
Re: Set a decimal value with a variable with colon
« Reply #4 on: November 23, 2020, 10:07:30 PM »

just an update:

I tried using LOCAL VARIABLE (LVAR) and SIMCONNECT, it just won't work. When switched to variable of FSUIPC, it worked without any problems.


This only happens with some of the variables.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Set a decimal value with a variable with colon
« Reply #5 on: November 24, 2020, 07:56:31 AM »
If it works with one API but not the other, that would indicate the issue is not with VoiceAttack itself.

You'll want to contact the author of SPAD.neXt about that via their support ticket system, or their forum.