Grabbing a remote exec function return?

  1. 8 years ago

    So yeah i need the index number on actions im adding to vehicles through remoteExec.

    FOBA_State = [ConTruck, ["Remove FOB-Alpha", {execVM "FOB\FOBA_Active.sqf"}]] remoteExec ["addAction", 0 , ConTruck, true];

    FOBA_State in this format is obviously grabbing the returns for remoteExec not addAction. How would i store the addAction return (index number) to a variable so i could publicly remove it too?

    the return for FOBA_State is "2:1289" I tried removing both of those but as they dont remove the action i want or any im assuming these values arent for the addAction return.

    Thanks ahead of time.

    Matt

  2. Edited 8 years ago by SpyderBlack723

    You'll have to pass some identifier to the remotely executed function which then has to remoteExecCall back to sender. Treat it similar to a spawned function in the sense that is returns no value on its own.

  3. What the best way to do that? My first thought is dump the addAction into a .sqf and ExecVM it across all the clients with remoteExec.

    Not sure if that the best way though...

    That way though i could dump the addAction return value into a global variable at least. I'll give that a try and see what happens.

  4. Ok that worked thanks!

 

or Sign Up to reply!