{"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","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"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":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"a","type":null,"optional":false,"default":null,"description":"| Introduced in | Possible Type |\n|---|---|\n| Operation Flashpoint v1.00 | Number |\n| Side |  |\n| String |  |\n| Object |  |\n| Group |  |\n| Armed Assault v1.00 | Structured Text |\n| Config |  |\n| Display |  |\n| Control |  |\n| Armed Assault v1.08 | Location |\n| Arma 3 v2.00 | Diary Record |\n| Namespace |  |\n| Boolean |  |","types":[],"since":null,"text":"a:\n\n| Introduced in | Possible Type |\n|---|---|\n| Operation Flashpoint v1.00 | Number |\n| Side |  |\n| String |  |\n| Object |  |\n| Group |  |\n| Armed Assault v1.00 | Structured Text |\n| Config |  |\n| Display |  |\n| Control |  |\n| Armed Assault v1.08 | Location |\n| Arma 3 v2.00 | Diary Record |\n| Namespace |  |\n| Boolean |  |"},{"name":"b","type":"identical to a's type","optional":false,"default":null,"description":null,"types":[],"since":null,"text":"b: identical to *a*'s type"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if a is different from b, false otherwise","text":"Boolean - true if *a* is different from *b*, false otherwise"},"form":"binary","operator":"!=","left":{"text":"a","types":[]},"right":{"text":"b","types":[]}}],"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};"]},{"text":"```sqf\nif (alive _unit1 != alive _unit2) then { hint \"One of the units is dead while another is alive\" };\n```","code":["if (alive _unit1 != alive _unit2) then { hint \"One of the units is dead while another is alive\" };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["==","Operators"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Math","Command Group: Variables","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}