{"name":"scriptName","operator":null,"title":"scriptName","type":"command","url":"https://community.bistudio.com/wiki/scriptName","revid":369379,"updated":"2024-09-03T18:43:13Z","groups":["Program Flow"],"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":null,"effect":null,"server_exec":false},"exec":null,"description":"Assign a user friendly name to the VM script this command is executed from.\n\n> [!IMPORTANT]\n> Once a name is assigned, it cannot be changed.","syntaxes":[{"syntax":"scriptName name","since":null,"effect":null,"exec":null,"params":[{"name":"name","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"name: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"name","types":["String"]}}],"examples":[{"text":"```sqf\nscriptName \"leetScript.sqf\";\n```","code":["scriptName \"leetScript.sqf\";"]},{"text":"```sqf\nscriptName format [\"%1ARTY\\data\\scripts\\ARTY_sadarmDeploy.sqf (_this: %1)\", _this];\n```","code":["scriptName format [\"%1ARTY\\data\\scripts\\ARTY_sadarmDeploy.sqf (_this: %1)\", _this];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["spawn","execVM","scriptDone"],"notes":[{"user":"PhilippRauch","date":"2009-06-13T17:39:00Z","text":"scriptName is good when you want to load the handle of some spawn or call with some name:\n\n```sqf\nexample_scripthandle = 0 spawn {\n    scriptName \"Example\";\n    systemChat str example_scripthandle; // System: Example\n}\n```"}],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Program Flow","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}