{"name":"rankId","operator":null,"title":"rankId","type":"command","url":"https://community.bistudio.com/wiki/rankId","revid":319405,"updated":"2022-05-13T09:24:01Z","groups":["Unit Identity"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Return the rank of the given unit for comparison.\n\nValue may be:\n- **0** - Private\n- **1** - Corporal\n- **2** - Sergeant\n- **3** - Lieutenant\n- **4** - Captain\n- **5** - Major\n- **6** - Colonel","syntaxes":[{"syntax":"rankId unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\n_myIdRank = rankId player;\n```","code":["_myIdRank = rankId player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["rank"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Identity","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}