Jump to content

gnif

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About gnif

  • Rank
    Rookie
  1. I found the problem... fnc_usec_selfActions does not return anything, so _result = _params call fnc_usec_selfActions fails. Would have been nice
  2. Hi All, I am attempting to create a nice little framework for overriding/extnding pre compiled functions, which I cant seem to get to work properly. overrideMethod = { private ["_oldFn", "_list", "_params", "_result", "_handled"]; _oldFn = _this select 0; _list = _this select 1; _params = _this select 2; _handled = false; { // call the method _result = _params call _x; // check if the call has been handled if ((_result select 0)) exitWith { _handled = true; _result = _result select 1; }; } forEach _list; if (!_handled) then { _result = _params call _oldFn; }; _result }; // method overrides if (!isNil "fnc_usec_selfActions") then { fnc_usec_selfActionsOrig = fnc_usec_selfActions; fnc_usec_selfActionsList = []; fnc_usec_selfActions = { private ["_result"]; _result = [fnc_usec_selfActionsOrig, fnc_usec_selfActionsList, _this] call overrideMethod; _result }; // this looks strange here, but it is here because this code is generated dynamically by a patching API. fnc_usec_selfActionsList set [count fnc_usec_selfActionsList, compile preprocessFileLineNumbers "extended.sqf"]; }; I am getting the following error (client side only). Error in expression <h _list; if (!_handled) then { _result = _params call _oldFn; }; _result }; > Error position: <= _params call _oldFn; }; _result }; > Error Generic error in expression File mpmissions\__CUR_MP.Chernarus\overrides.sqf, line 23 I do not understand what is wrong here. It seems if I put a diagLog "Testing"; before calling _oldFn it fixes the issue.
  3. Hi All, I have a script that spawns a UAV in a multi-player server and flies it around a set path, this works great, the problem is that some players are getting rammed by the UAV while flying, and as much as people love the addition, it is also making people leave. Is there a way to create the UAV in such a way that it has no hit-box, so if it rams a player, nothing occurs?
  4. Hi All, I am writing some code that parses the BERcon output on the server side to implement special commands and whatnot. The only issue is that when a player sends a chat message, if they are not in the vicinity of another player (direct/vehicle chat), or if there is nobody else on-line (side chat), the chat messages are not sent to the server. Is there any way to work around this? be it an alternative input mechanism, or a simple code change to make sure the messages are sent? Thanks in advance
×