Jump to content
The simFlight Network Forums

Button Assignment: Parameter not saved


kaha

Recommended Posts

One strange thing: When assigning a lua script to a button the Parameter is not saved, it goes back to 0. Other lua scripts work. Renaming the script does not cure it. Not sure what's the reason. Here is a video (Dropbox link):

 

https://www.dropbox.com/scl/fi/aumkxe9n18ero2cl99eqo/FSUIPC.mp4?rlkey=oqxlh23b6fss1gglyvcto5uh3&dl=0

 

Anything I can do, John? Do you need any logs or anything else?

Thank you,

Karl

Link to comment
Share on other sites

  • 2 weeks later...
On 12/22/2023 at 4:11 AM, kaha said:

One strange thing: When assigning a lua script to a button the Parameter is not saved, it goes back to 0. Other lua scripts work. Renaming the script does not cure it. Not sure what's the reason. Here is a video (Dropbox link):

 

https://www.dropbox.com/scl/fi/aumkxe9n18ero2cl99eqo/FSUIPC.mp4?rlkey=oqxlh23b6fss1gglyvcto5uh3&dl=0

 

Anything I can do, John? Do you need any logs or anything else?

Thank you,

Karl

I have just run into the same problem -- button Param values are reset to 0, but key assignment Param values are not, all with the same LuaToggle script. I tried turning off FSUIPC7 and editing the FSUIPC7.ini file directly (put in the Param values) and saving it. When FSUIPC7 restarted the Params had been reset back to 0.

Another user, using an exact copy of the same Lua script, and the same version of FSUIPC7 (7.4.1), does not have this problem.

Tried reinstalling FSUIPC7, didn't help.

Very strange.

Al

Link to comment
Share on other sites

8 hours ago, ark1320 said:

I have just run into the same problem -- button Param values are reset to 0, but key assignment Param values are not, all with the same LuaToggle script. I tried turning off FSUIPC7 and editing the FSUIPC7.ini file directly (put in the Param values) and saving it. When FSUIPC7 restarted the Params had been reset back to 0.

Another user, using an exact copy of the same Lua script, and the same version of FSUIPC7 (7.4.1), does not have this problem.

Tried reinstalling FSUIPC7, didn't help.

Very strange.

Al

I also tried to edit the .ini file, but it getss reverted.

 

Karl

Link to comment
Share on other sites

9 hours ago, kaha said:

I also tried to edit the .ini file, but it getss reverted.

 

Karl

As a test, I renamed my FSUIPC7.ini file to back it up, and let FSUIPC7 create a new one. Then button Param assignments worked. So there is something about my existing FSUIPC7.ini file -- maybe some kind of a limit has been reached. I noticed I can make button Param assignments to older Lua scripts, but not to new ones although I can make Param assignments when assigning keys. So perhaps some kind of a button related limit?

Will continue to experiment.

Al

 

 

 

Link to comment
Share on other sites

I finally went back to FSUIPC7 ver 7.3.21 and now everything is working again. On my system both FSUIPC7 versions 7.4 and 7.4.1 have the button Param problem discussed above. Used the same FSUIPC7.ini file in all cases. I don't know where the problem is when using the newer versions  -- FSUIPC7 or my system. I wonder if using the new assign buttons to input events functionality in versions 7.4 and 7.4.1 introduced a strange bug -- just a thought.

Al

Link to comment
Share on other sites

3 minutes ago, John Dowson said:

I've just tried here and cannot reproduce this. Could you show me your FSUIPC7.ini files please and let me know which assignments are having this issue.

In [Buttons] its nr. 61 to 64. The corresponding .lua files are in the .zip together with the .log files which don't show an error.

 

Karl

Karl.zip

Link to comment
Share on other sites

7 minutes ago, John Dowson said:

Could you try the attached version please:

FSUIPC7.exe 661.5 kB · 0 downloads

There's adifference to the old .exe: As long as FSUIPC is running the parameters show correctly in the Buttun Assignment window when changing to different switches. In the old version it showed zeros only. But after ending FSUIPC the .ini file stills is not updated, it still shows zeros.

Link to comment
Share on other sites

3 hours ago, John Dowson said:

Can you try the attached please: FSUIPC7.exe

That version should hopefully fix this issue. There was a problem with the flags that indicated lua/preset/input event as the same bits are used when the lua file index number is 32 or higher. This should now be corrected.

John

Hi John,

This latest FSUIPC7.exe version has fixed the problem for me. Thank you!

Al

Link to comment
Share on other sites

  • 2 weeks later...
On 1/2/2024 at 5:50 AM, John Dowson said:

There is still an issue - it saves ok but when you restart the parameters are reset to zero. I am looking into it....

John

Hi John  -- I am having this problem again. I was defining new presets in myevents.txt, and subsequently noticed saved parameters associated with new key assignments were being reset to 0 when FSUIPC7 restarted. I am using FSUIPC7 ver 7.4.2. I tried reinstalling FSJUIPC7 but the problem persists.

Al

Link to comment
Share on other sites

On 1/14/2024 at 3:38 AM, John Dowson said:

can you provide steps to reproduce and I will check this here.

John, did some more investigating and read back through this thread and saw your comment that "There was a problem with the flags that indicated lua/preset/input event as the same bits are used when the lua file index number is 32 or higher" and realized my problem Lua script had an index of 36. When I changed the Lua script index to 28, the problem went away.  Attached is a simplified version of the script, but exhibits the same problem behavior when I give it an index of 58, but works correctly when I change the index to 28. Note the script makes use of calculator code. 

Thanks,

Al

 

LJet35CtrlsTest.lua

Link to comment
Share on other sites

Looks like I missed adding an additional check in the key assignments code that I added in the button assignments code for this issue - sorry about that,

Please try the attached version, 7.4.3a: FSUIPC7.exe

Note also that when assigning key presses, always Confirm before pressing Ok, otherwise the parameter will not be saved.

John

Link to comment
Share on other sites

3 hours ago, John Dowson said:

Please try the attached version, 7.4.3a: FSUIPC7.exe

Hi John, ver 7.4.3a has fixed the "unsaved" parameter problem for Lua scripts with an index greater than or equal to 32 (tested with script index of 59).

Best to your wife for a speedy recovery,

Al

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.