mikie boy 18 Posted July 3, 2013 Couldnt find this anywhere... been developing my Database system using Arma2Net and MySql - works well and recommend it to others All equipment position, direction etc saves and recalls perfectly from the sql database. simply using things like _backpack = (backpack _player); (_player is defined via identifying player UID and sorting through list of playable units). I load it in with onplayerconnected and save it out using onplayerdisconnected. The problem comes when using _DLicence = _player getVariable "DLicence"; and disconnecting.....It just returns null - checking the wiki 'getvariable' - "Returns Nothing if the variable doesn't exist." "Returns Anything if the object is undefined." The variable i'm setting updates to the database when i'm in game (using a while loop). im assuming that there is an issue with using getvariable and player when disconnecting - is there another way to save a variable to a player, then on disconnecting relate to that variable. I tried with profilenamespace - again it just turns up null. Any help would be appreciated chaps Mike p.s if the above is not clear to anyone just say and ill try again :) Share this post Link to post Share on other sites
LoonyWarrior 10 Posted July 3, 2013 onPlayerDisconnected is fired after the actual disconect... player isnt there anymore............ and u cant depend on it, since it doesnt have to be fired... :( Share this post Link to post Share on other sites
mikie boy 18 Posted July 3, 2013 everything else works perfectly from using the onplayerdisconnected - 100 percent - turns out after thinking ive tried everything - the last thing i could think of was to broadcast the variable to all computers and it worked _unitdriver setVariable ["DLicence", _pDrivLicence + _TotalDrive, true]; Share this post Link to post Share on other sites