william1 0 Posted June 29, 2006 hi , when i execute this script : ~1 a1 action ["eject", h1]; unassignvehicle a1; ~2.5 a2 action ["eject", h1]; unassignvehicle a2; exit it shows this message on the screen during the game: 'exit|#|\par ' error unknown operator it is a scrpit for jumping from a chopper, and i think it is ok so i don't know why this error shows , any idea ? thanks Share this post Link to post Share on other sites
NeMeSiS 11 Posted June 29, 2006 Scripts usually dont have a ; at the end of a line, i think that causes the problem Share this post Link to post Share on other sites
5133p39 14 Posted June 29, 2006 Scripts usually dont have a ; at the end of a line, i think that causes the problem Only if there is another command on the same line. Only SQF functions require the semicolon after each command, no matter whether there is anything after on the same line. William1: What editor are you using? Are you sure there isn't anything after the exit command? Share this post Link to post Share on other sites
william1 0 Posted June 29, 2006 mmm no, it's not that , i have tried without the ";" and the message keeps showing , also the script doesn't work properly without the ";" Share this post Link to post Share on other sites
william1 0 Posted June 29, 2006 Scripts usually dont have a ; at the end of a line, i think that causes the problem Only if there is another command on the same line. Only SQF functions require the semicolon after each command, no matter whether there is anything after on the same line. William1: What editor are you using? Are you sure there isn't anything after the exit command? i'm using wordpad yes, i have checked it again , there is nothing after "exit" Share this post Link to post Share on other sites
NeMeSiS 11 Posted June 29, 2006 i'm using wordpad   Try Notepad , some other text-editors can mess things up EDIT: AFAIK there is some tool specially made for writing scripts in OFP (uses colored tags for commands etc), i think you can find it on OFP.info in the utilities section, but i dont know the name. Share this post Link to post Share on other sites
UNN 0 Posted June 29, 2006 There is nothing wrong with the script, you posted. I would double check your sqs file with notepad, just to make sure you have no unwanted characters in there. You might have corrupt exit command, caused by something else in another section of your mission. If there is no code after the exit command then remove it, you don't need to call exit at the end of a script. If that does not work, try re-typing your script with notepad and test it in a new mission, using the standard BIS addons. Share this post Link to post Share on other sites
Metal Heart 0 Posted June 29, 2006 Quote[/b] ]exit|#|\par Wordpad adds something to the end of file that ofp parser doesn't understand. Use notepad or try adding a semicolon and a line change after the exit command. Share this post Link to post Share on other sites
william1 0 Posted June 29, 2006 i'm using wordpad Try Notepad , some other text-editors can mess things up EDIT: AFAIK there is some tool specially made for writing scripts in OFP (uses colored tags for commands etc), i think you can find it on OFP.info in the utilities section, but i dont know the name. that's it ! thanks ofpforum , and UNN and 5133p39 and metalheart , it is the wordpad that mess all up , i have opened the script whit notepad and this is what it contains , Incredible !! {\rtf1\ansi\ansicpg1252\deff0\deflang3082{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 ~1\par a1 action ["eject", h1];\par unassignvehicle a1;\par ~2.5\par a2 action ["eject", h1];\par unassignvehicle a2;\par exit\par } Share this post Link to post Share on other sites
Wadmann 0 Posted June 29, 2006 Quote[/b] ]AFAIK there is some tool specially made for writing scripts in OFP (uses colored tags for commands etc), i think you can find it on OFP.info in the utilities section, but i dont know the name. I believe that you may be speaking of Chris Henderson's OFP Script Editor. It is available here. Great tool as it really helps to spot/prevent frustrating typos and contains all commands, weapons, and ammo. Even includes a few simple scripts that you can use and learn by when just getting into OFP scripting. Wadmann Share this post Link to post Share on other sites
william1 0 Posted June 30, 2006 thanks Wadmann , very kind of you Share this post Link to post Share on other sites
NeMeSiS 11 Posted June 30, 2006 Scripts usually dont have a ; at the end of a line, i think that causes the problem Only if there is another command on the same line. Only SQF functions require the semicolon after each command, no matter whether there is anything after on the same line. Thats why i said usually @Wadmann, that was indeed the tool i was talking about! Thnaksfor finding it cause im using it myself now aswell Share this post Link to post Share on other sites