quakergamer 0 Posted April 24, 2004 Hello, please look @ this eventhandler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> fired = "if ((_this select 1) == "OPGWC_T62_U5TS") Then {(_this select 0, _this select 1) exec {wahteverpbo\script.sqs}}"; What am I doing wrong because it gives me an error as soon as I start OFP! Share this post Link to post Share on other sites
bn880 5 Posted April 24, 2004 Try replacing the " " inside the EH line with { } Share this post Link to post Share on other sites
raedor 8 Posted April 24, 2004 Hello,please look @ this eventhandler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> fired = "if ((_this select 1) == "OPGWC_T62_U5TS") Then {(_this select 0, _this select 1) exec {wahteverpbo\script.sqs}}"; What am I doing wrong because it gives me an error as soon as I start OFP! <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fired = "if ((_this select 1) == {OPGWC_T62_U5TS}) Then {[_this select 0, _this select 1] exec {wahteverpbo\script.sqs}}";1. what bn880 said 2. the argument of exec has to be _one_ object/number/string or an array. and an array has []. Share this post Link to post Share on other sites
bn880 5 Posted April 24, 2004 Nothing wrong with the array that I can see, what do you mean? He could do _this exec{script} but it is essentially not going to bug out either way. EDIT: Also it has to be {\wahteverpbo\script.sqs}}"; not {wahteverpbo\script.sqs}}"; Share this post Link to post Share on other sites
raedor 8 Posted April 24, 2004 huh? you can open a script with<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(arg1, arg2) exec "script.sqs"are you sure? Share this post Link to post Share on other sites
bn880 5 Posted April 24, 2004 huh? you can open a script with<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(arg1, arg2) exec "script.sqs"are you sure? EDIT lol right, he used (), if he used [] it owuld be right sorry Share this post Link to post Share on other sites