-
Hi, For this I use L Var : INI_MAP_MODE_CAPT_SWITCH or INI_MAP_MODE_CAPT. When using WASimUI, I can see these variables moving from 0 to 4 when rotating the swithch in MSFS or in Touch portal. On event, I have been putting different icons to show the state of Rotary switch in Touch Portal. I have described LVar in CustomStates.ini [Ini_Map_Mode_Capt] [Ini_Map_Mode_Capt_Switch] You will see following errors that I get in the Touch Portal plugin log: [01.27 12:43:17.966] [WRN] MSFSTouchPortalPlugin.Services.SimConnectService: [WASM] "Client" - Lookup command returned Nak response. Reason, if any: "Lookup type LocalVariable failed for name "INI_SHOW_AIRPORTS"" I can't see error for "INI_MAP_MODE_CAPT_SWITCH" See below "On Event" tab description: I am probably doing mistakes as I am new with Touch portal and Plugin. Any advice will be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi Philippe, Could it be the To get rid of the Of course you could also test that theory by changing the comparison value in the Since neither of the Assuming you've verified/found those L vars in the mode's Behaviors debug window and it's not working as I described above please let me know! HTH, |
Beta Was this translation helpful? Give feedback.
-
Hi Max, You are perfectly right; This is the .00 which was the problem. Philippe |
Beta Was this translation helpful? Give feedback.
Hi Philippe,
Could it be the
.00
in theINI_MAP_MODE_CAPT_SWITCH
values? So TP is trying to compare1
with1.00
? I know mathematically that should work, but TP might be treating those values as strings, not numbers.To get rid of the
.00
in the value just remove theStringFormat = "F2"
line from your requests.F2
tells it to format as a floating point number with 2 decimals. In this case the value is already an integer so no further formatting is needed.Of course you could also test that theory by changing the comparison value in the
IF
statement to include the decimals, eg.1.00
, but ultimately getting rid of the special formatting would be better.Since neither of the
INI_MAP_MODE_*
va…