{"name":"load","title":"load","type":"command","url":"https://community.bistudio.com/wiki/load","revid":347534,"updated":"2023-09-28T08:15:16Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","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","params":[{"name":"unit","type":"Object","description":"(before Arma 3 v2.08 the command did not support containers, ammo boxes, weapon holders, vehicle cargos)","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"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\");"]}],"see_also":["maxLoad","loadAbs","loadBackpack","loadUniform","loadVest","getMass","weightRTD","getContainerMaxLoad"]}