Jump to content
Sign in to follow this  
quakergamer

Eventhandler syntax problem.

Recommended Posts

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

Try replacing the " " inside the EH line with { }

Share this post


Link to post
Share on other sites
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

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}}"; smile_o.gif

Share this post


Link to post
Share on other sites

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? rock.gif

Share this post


Link to post
Share on other sites
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? rock.gif

EDIT lol right, he used (), if he used [] it owuld be right sorry

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×