gc8 970 Posted April 20, 2019 HI I'm trying to set a single variable on client by calling a function in the client with remoteExecCall. but for some reason the function never gets called on client. Here's my server code: ["SENDING VEHICLE LEVEL TO CLIENT %1 %2 %3 (%4)",_level,_side, format["VehResLvl_%1",_side], call getPlayers] call dbgmsg; // Prints! _level remoteExecCall ["setVehicleResearchLevel", _side, format["VehResLvl_%1",_side]]; I checked that all variables are ok This function (client) never gets called: setVehicleResearchLevel = { ["GOT VEHICLE LEVEL %1", _this] call dbgmsg; // Does not print vehicleResearchLevel = _this; }; as you can see I'm using custom debug print function dbgmsg I think the problem maybe with the fact that I run dedicated server and then join client (JIP) Any idea what's wrong with my code? thx! Share this post Link to post Share on other sites
gc8 970 Posted April 20, 2019 Figured it out, the function had not yet been created in client when it was called from server. I thought it had to be something simple 🙂 But how do you deal with these situations? Maybe I do some client register call on server when client is ready Share this post Link to post Share on other sites
Larrow 2794 Posted April 21, 2019 23 hours ago, gc8 said: But how do you deal with these situations? Maybe I do some client register call on server when client is ready Possibly, or use CfgFunction to define your functions. Then they are compiled and ready before anything in the initialisation order. 2 Share this post Link to post Share on other sites
gc8 970 Posted April 21, 2019 37 minutes ago, Larrow said: Possibly, or use CfgFunction to define your functions. Then they are compiled and ready before anything in the initialisation order. Yeah thx that's what I did, I put the function in preinit. Good thing there was no other function dependencies so I didn't have to do a lot of extra work. Share this post Link to post Share on other sites