{"name":"getRepairCargo","operator":null,"title":"getRepairCargo","type":"command","url":"https://community.bistudio.com/wiki/getRepairCargo","revid":364120,"updated":"2024-05-04T22:07:42Z","groups":["Vehicle Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.56"}],"since":{"game":"arma3","name":"Arma 3","version":"0.56"},"arma3_since":"0.56","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the amount (1 is full) of repair resources in the cargo space of a repair vehicle. \n\n> [!NOTE]\n> Since Arma 3 v1.96 the return value for vehicles that are not configured to have ability to repair other vehicles is -1. (Prior to that the value was negative infinity)","syntaxes":[{"syntax":"getRepairCargo vehicle","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"}],"returns":{"type":"Number","types":["Number"],"description":"repair cargo value, -1 if repair cargo is not supported, 0 if the vehicle is !alive or isNull","text":"Number - repair cargo value, -1 if repair cargo is not supported, 0 if the vehicle is !alive or isNull"},"form":"unary","operator":null,"left":null,"right":{"text":"vehicle","types":["Object"]}}],"examples":[{"text":"```sqf\nvalue = getRepairCargo vehicleName;\n```","code":["value = getRepairCargo vehicleName;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setRepairCargo","getAmmoCargo","getFuelCargo"],"notes":[{"user":"DreadedEntity","date":"2022-04-24T06:13:18Z","text":"The repair cargo does actually reduce when a repair truck repairs something, however, the default cargo amount of 1 is so high it is functionally infinite. It's inconceivable that you would drain the pool. You would need to set the cargo to 10^-5 or 10^-6 (0.000001 or 0.0000001) before it is low enough to \"realistically\" run out given how physically large the storage pods on the trucks are"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Vehicle Inventory","Introduced with Arma 3 version 0.56","Scripting Commands"]}