jts_2009 96 Posted October 26, 2019 Hey guys. Got a question. My friend created an multiplayer game (Host). I am client. Server executes script (on host and each client), where the game is saved and some variable is saved to profileNamespace. profileNamespace setVariable ["vxpz_profile_stats", _Array]; saveProfileNamespace; But there is a problem. On host machine there is all fine, but on my machine the variable is not exist. <null>. What it wrong...? Also when Host load the game, the variable isn't exist after loading the game on client. When game is loaded from a save - script is executed to get that variable. But it just doesn't exist Share this post Link to post Share on other sites
killzone_kid 1326 Posted October 27, 2019 There are 2, no 3 reasons the variable doesn’t exist on client: 1. The code never runs on client 2. The code runs on client, but client uses different player profile when joins 3. The code runs on client, but client has profile file set to read-only Share this post Link to post Share on other sites
jts_2009 96 Posted October 27, 2019 5 hours ago, killzone_kid said: There are 2, no 3 reasons the variable doesn’t exist on client: 1. The code never runs on client 2. The code runs on client, but client uses different player profile when joins 3. The code runs on client, but client has profile file set to read-only 1. It runs on client. I debug all with systemchat. It also exist on client, as long he stay in the game 2. No, I had the same profile 3. No, there is no attribute set on 'Read only' in the file options. Also the script executes that way: ['inv_scripts\player_profile_saveVars.sqf'] remoteExec ['execVM', -2]; // On server it executes later, locally. I will try later to set 'true' option for setVariable. Maybe thats because of that 😞 profileNamespace setVariable ["vxpz_profile_stats", _Array, true]; saveProfileNamespace; Share this post Link to post Share on other sites
killzone_kid 1326 Posted October 27, 2019 true option works only for mission namespace. Maybe _array is nil? Share this post Link to post Share on other sites
jts_2009 96 Posted October 27, 2019 7 minutes ago, killzone_kid said: true option works only for mission namespace. Maybe _array is nil? No it's not. Thats because Im surprised - why that doesn't work. Also the variable exist on client as long he is in the game Share this post Link to post Share on other sites
killzone_kid 1326 Posted October 27, 2019 You can derap the profile and see if the variable has been added to file, if not, could be disk write problem. Do you have another instance of Arma opened on the same pc? Share this post Link to post Share on other sites
jts_2009 96 Posted October 27, 2019 1 hour ago, killzone_kid said: You can derap the profile and see if the variable has been added to file, if not, could be disk write problem. Do you have another instance of Arma opened on the same pc? That was my fault. Somewhere in script it was set to nil. lol. Sorry. False alarm 👀 Share this post Link to post Share on other sites