{"name":"load","operator":null,"title":"load","type":"command","url":"https://community.bistudio.com/wiki/load","revid":347534,"updated":"2023-09-28T08:15:16Z","groups":["Unit Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the percentage of fullness of a unit's cargo. Output is usually in range 0..1, but can be higher after using certain scripting commands (like addWeaponWithAttachmentsCargoGlobal) which ignore load values when adding items.\n\n> [!NOTE]\n> See #Example 2 for load calculation.","syntaxes":[{"syntax":"load unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"(before Arma 3 v2.08 the command did not support containers, ammo boxes, weapon holders, vehicle cargos)","types":["Object"],"since":null,"text":"unit: Object - (before Arma 3 v2.08 the command did not support containers, ammo boxes, weapon holders, vehicle cargos)"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nload player;\n```","code":["load player;"]},{"text":"unit load calculation formula:\n\n```sqf\nprivate _unitLoad = loadAbs _unit / getNumber (configFile >> \"CfgInventoryGlobalVariable\" >> \"maxSoldierLoad\");\n```","code":["private _unitLoad = loadAbs _unit / getNumber (configFile >> \"CfgInventoryGlobalVariable\" >> \"maxSoldierLoad\");"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["maxLoad","loadAbs","loadBackpack","loadUniform","loadVest","getMass","weightRTD","getContainerMaxLoad"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Introduced with Arma 3 version 0.50","Scripting Commands"]}