aduke823 63 Posted July 25, 2013 Man, that worked perfect! Although, I do now have an error generated from "add_waypoints.sqf"....... Variable '_ctrl' does not support serialization. Call 'disableSerialization' in the current script {maybe 'ad_helos_det7\Scripts\add_waypoints.sqf'} if you need to use it. So I added disableSerialization to the script like so............ _airCraft = vehicle player; _params = _this select 1;_ctrl = _params select 0;_button = _params select 1;_mapX = _params select 2;_mapY = _params select 3;_altKeyPressed = _params select 6;_pos = [];_hasPermission = false; DisableSerialization; // Check the permissionsif (driver _airCraft == player || _airCraft turretUnit [2] == player) then { _hasPermission = true; }; else{ // Check if player is the first in cargo (aka co-pilot) _crew = crew _airCraft; _cargo = _crew - [driver _airCraft] - [gunner _airCraft] - [commander _airCraft]; if (_cargo select 0 == player) then { _hasPermission = true; };}; if (_button == 0) then{ if (_hasPermission) then { _pos = _ctrl ctrlMapScreenToWorld [_mapX, _mapY]; if (!_altKeyPressed) then { _wp = group player addWaypoint [_pos, 0]; _wp setWaypointType "MOVE"; _wp showWaypoint "ALWAYS"; _wp setWaypointStatements ["true", "deleteWaypoint [group this, 0];"]; playSound "ad_bleep"; } else { _closer = 0; _min_dst = 100000; _wps = waypoints group player; for "_i" from 0 to ((count _wps)-1) do { _dist = _pos distance getWPPos [group player, _i]; if ((_dist < _min_dst) && (_dist < 100)) then { _min_dst = _dist; _closer = _i; }; }; if (_closer != 0) then { deleteWaypoint [group player, _closer]; }; }; } else { playSound "ad_denied"; titleText ["You are not allowed to modify waypoints", "PLAIN DOWN"]; };}; But that error still appears..... When the error occured I was in the pilot's seat, but was not the group leader, the dialog came up, but as soon as I clicked within the map, that error happened. -AD Share this post Link to post Share on other sites
xxanimusxx 2 Posted July 26, 2013 Hmm I always wondered why this error didn't appear earlier xD Put the disableSerialization at the very top of your script, before _ctrl is defined. That should get rid of the error. And wtf is wrong with your PHP-Tags? xD Share this post Link to post Share on other sites