Author Topic: [v1.7.9.5] Profile events not firing at startup or after unload command  (Read 1432 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
As reported on Discord, the "ProfileChanged" event does not fire when VoiceAttack starts initially (neither does "ProfileChanging", but that was already said to "look" intentional).


In addition, if a profile has the "Execute a command each time this profile is unloaded" option checked, even if the chosen command executes no actions, the "ProfileChanging" event fires, but the "ProfileChanged" event does not.


I have confirmed both using a plugin and an inline function.


EDIT: ProfileChanged event now fires when using an unload command in v1.8.3.22
« Last Edit: March 07, 2020, 10:35:18 PM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Commands don't get a chance to execute until after a profile has fully loaded.  'Changing' and 'Changed' events would have occurred prior to the commands being available to even be able to handle the events.  I think we talked a while back about having the plugins load prior to any profile, but I decided at some point to not do that as profiles would require some way to indicate priority level (and then we're back to authors duking it).

I was able to fix the 'Changed' event on profile unload, though - it will be in the next update.  Thanks again for all you do, Mr. Pfeil!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
From what you're saying it seems the commands would be available (as the profile loads before plugins do), but the problem is that there is no guarantee a plugin has been loaded (and as such any event handlers may not be in place yet) at the point the "ProfileChanged" event would fire?

Just trying to make sure I understand the startup process correctly.