{"name":"a != b","operator":"!=","title":"a != b","type":"command","url":"https://community.bistudio.com/wiki/a_!%3D_b","revid":376993,"updated":"2026-01-01T08:00:36Z","groups":["Variables","Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns whether one value is **not** equal to another. String comparison is case-**in**sensitive (e.g `\"STRINGtext\" != \"stringTEXT\" // returns false - strings are equivalent`).\n\n> [!IMPORTANT]\n> *a* and *b* types **must** match: comparing e.g String with Number is invalid.","syntaxes":[{"syntax":"a != b","params":[{"name":"a","description":"| Introduced in | Possible Type |\n|---|---|\n| Operation Flashpoint v1.00 | Number |\n| Operation Flashpoint v1.00 | Side |\n| Operation Flashpoint v1.00 | String |\n| Operation Flashpoint v1.00 | Object |\n| Operation Flashpoint v1.00 | Group |\n| Armed Assault v1.00 | Structured Text |\n| Armed Assault v1.00 | Config |\n| Armed Assault v1.00 | Display |\n| Armed Assault v1.00 | Control |\n| Armed Assault v1.08 | Location |\n| Arma 3 v2.00 | Diary Record |\n| Arma 3 v2.00 | Namespace |\n| Arma 3 v2.00 | Boolean |","type_expr":"Number | Side | String | Object | Group | Structured Text | Config | Display | Control | Location | Diary Record | Namespace | Boolean","text":"a:\n\n| Introduced in | Possible Type |\n|---|---|\n| Operation Flashpoint v1.00 | Number |\n| Operation Flashpoint v1.00 | Side |\n| Operation Flashpoint v1.00 | String |\n| Operation Flashpoint v1.00 | Object |\n| Operation Flashpoint v1.00 | Group |\n| Armed Assault v1.00 | Structured Text |\n| Armed Assault v1.00 | Config |\n| Armed Assault v1.00 | Display |\n| Armed Assault v1.00 | Control |\n| Armed Assault v1.08 | Location |\n| Arma 3 v2.00 | Diary Record |\n| Arma 3 v2.00 | Namespace |\n| Arma 3 v2.00 | Boolean |"},{"name":"b","type":"identical to a's type","text":"b: identical to *a*'s type"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if a is different from b, false otherwise","text":"Boolean - true if *a* is different from *b*, false otherwise"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nif (_counter != 4) then\n{\n    hint \"The counter is not equal to the number 4\";\n};\n```","code":["if (_counter != 4) then\n{\n\thint \"The counter is not equal to the number 4\";\n};"]},{"text":"```sqf\nif (vehicle player != player) then\n{\n    hint \"you are in a vehicle\";\n}\nelse\n{\n    hint \"you are on foot\";\n};\n```","code":["if (vehicle player != player) then\n{\n\thint \"you are in a vehicle\";\n}\nelse\n{\n\thint \"you are on foot\";\n};"]},{"text":"```sqf\nif (fuel truck1 != 1) then\n{\n    hint \"Truck1 has less than a full tank of fuel.\";\n};\n```","code":["if (fuel truck1 != 1) then\n{\n\thint \"Truck1 has less than a full tank of fuel.\";\n};"]},{"code":["if (alive _unit1 != alive _unit2) then { hint \"One of the units is dead while another is alive\" };"]}],"see_also":["==","Operators"]}