addEventHandler and calling sqf file issue - Printable Version +- Comrades in Arms Discussion Board (http://forum.ciahome.net) +-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3) +--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8) +--- Thread: addEventHandler and calling sqf file issue (/showthread.php?tid=3365) |
addEventHandler and calling sqf file issue - treendy - 05-10-2016 This works as expected in the init sqf (i.e., nothing hints) Code: if ("test" != "test") then { However, when using an event in the init of a unit: Code: "this addEventHandler ["killed", {_this exec "RandFramework\CivKilled.sqf"}]" my CivKilled.sqf file simply has the statements above (removed all code to help debug this) yet, I am now seeing the hint "IN IF"? I do get a small error shown from FHQDebug Code: '|#|};' Error Missing { and when looking at the rpt file, this is the only clue. Code: 18:02:50 Error in expression <};> now, when I empty my CivKilled.sqf file, I get no error messages... This is my current CivKilled.sqf content: Code: _killed = _this select 0; tried without the top two lines and still get the error... but no error when empty... starting to think the sqf file that gets called from an eventHandler needs to have something more? but am not finding anything online Re: addEventHandler and calling sqf file issue - Alwarren - 05-10-2016 (05-10-2016, 07:24 PM)treendy link Wrote: Not surprised. The issue is the 'exec'. It calls an sqs file. If you don't know what that is, be thankful for it and change it to an "execVM" Re: addEventHandler and calling sqf file issue - treendy - 05-10-2016 THANK YOU!!!!!!!!!! I was about to set a public variable that fires a trigger that takes care of what I need to work around this Re: addEventHandler and calling sqf file issue - treendy - 05-10-2016 That worked. I can now stop shooting civilians for testing, was starting to feel a bit bad |