Bug peche de tortue

Bonjours a tous voila je vous explique mon problème qui est tout bête quand je tue une tortue et que je fait windows pour la ramasser rien ne s’affiche.

J’aurais besoin d’aide pour résoudre cela merci a ceux qui m’aideront.

Envoie tes fichiers … On peut rien faire sans.

les quelles stp ?

core/functions/fn_actionKeyHandler.sqf

core/actions/fn_catchTurtle.sqf

Et envoie tes log c’est encore mieux

Yep

/*  
	File: fn_keyHandler.sqf  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Main key handler for event 'keyDown'  
*/  
/*  
ESC = 1  
F1 = 59  
F2 = 60  
F3 = 61  
F4 = 62  
F5 = 63  
F6 = 64  
F7 = 65  
F8 = 66  
F9 = 67  
F10 = 68  
F11 = 87  
F12 = 88  
PRINT = 183  
SCROLL = 70  
PAUSE = 197  
^ = 41  
1 = 2  
2 = 3  
3 = 4  
4 = 5  
5 = 6  
6 = 7  
7 = 8  
8 = 9  
9 = 10  
0 = 11  
ß = 12  
´ = 13  
Ü = 26  
Ö = 39  
Ä = 40  
# = 43  
< = 86  
, = 51  
. = 52  
- = 53  
+ = NOT DEFINED  
POS1 = 199  
TAB = 15  
ENTER = 28  
DELETE = 211  
BACKSPACE = 14  
INSERT = 210  
END = 207  
PAGEUP = 201  
PAGEDOWN = 209  
CAPS = 58  
A = 30  
B = 48  
C = 46  
D = 32  
E = 18  
F = 33  
G = 34  
H = 35  
I = 23  
J = 36  
K = 37  
L = 38  
M = 50  
N = 49  
O = 24  
P = 25  
Q = 16  
U = 22  
R = 19  
S = 31  
T = 20  
V = 47  
W = 17  
X = 45  
Y = 44  
Z = 21  
SHIFTL = 42  
SHIFTR = 54  
UP = 200  
DOWN = 208  
LEFT = 203  
RIGHT = 205  
NUM_0 = 82  
NUM_1 = 79  
NUM_2 = 80  
NUM_3 = 81  
NUM_4 = 75  
NUM_5 = 76  
NUM_6 = 77  
NUM_7 = 71  
NUM_8 = 72  
NUM_9 = 73  
NUM_+ = 78  
NUM = 69  
NUM_/ = 181  
NUM_* = 55  
NUM_- = 74  
NUM_, = 83  
NUM_ENTER = 156  
STRGL = 29  
STRGR = 157  
WINL = 220  
WINR = 219  
ALT = 56  
SPACE = 57  
ALTGR = 184  
APP = 221   
*/  
private ["_handled","_shift","_alt","_code","_ctrl","_alt","_ctrlKey","_veh","_locked","_interactionKey","_mapKey","_interruptionKeys"];  
_ctrl = _this select 0;  
_code = _this select 1;  
_shift = _this select 2;  
_ctrlKey = _this select 3;  
_alt = _this select 4;  
_speed = speed cursorTarget;  
_handled = false;  

_interactionKey = if(count (actionKeys "User10") == 0) then {219} else {(actionKeys "User10") select 0};  
_mapKey = actionKeys "ShowMap" select 0;  
//hint str _code;  
_interruptionKeys = [17,30,31,32]; //A,S,W,D  

//Vault handling…  
if((_code in (actionKeys "GetOver") || _code in (actionKeys "salute")) && {(player getVariable ["restrained",false])}) exitWith {  
	true;  
};  

if(life_action_inUse) exitWith {  
	if(!life_interrupted && _code in _interruptionKeys) then {life_interrupted = true;};  
	_handled;  
};  

switch (_code) do  
{  
	//Space key for Jumping  
	case 57:  
	{  
		if(isNil "jumpActionTime") then {jumpActionTime = 0;};  
		if(_shift && {animationState player != "AovrPercMrunSrasWrflDf"} && {isTouchingGround player} && {stance player == "STAND"} && {speed player > 2} && {!life_is_arrested} && {(velocity player) select 2 < 2.5} && {time - jumpActionTime > 1.5}) then {  
			jumpActionTime = time; //Update the time.  
			[player,true] spawn life_fnc_jumpFnc; //Local execution  
			[[player,false],"life_fnc_jumpFnc",nil,FALSE] call life_fnc_MP; //Global execution   
			_handled = true;  
		};  
	};  

	//Map Key  
	case _mapKey:  
	{  
		switch (playerSide) do   
		{  
			case west: {if(!visibleMap) then {[] spawn life_fnc_copMarkers;}};  
			case independent: {if(!visibleMap) then {[] spawn life_fnc_medicMarkers;}};  
		};  
	};  

	//Holster / recall weapon.  
	case 35:  
	{  
		if(_shift && !_ctrlKey && currentWeapon player != "") then {  
			life_curWep_h = currentWeapon player;  
			player action ["SwitchWeapon", player, player, 100];  
			player switchcamera cameraView;  
		};  

		if(!_shift && _ctrlKey && !isNil "life_curWep_h" && {(life_curWep_h != "")}) then {  
			if(life_curWep_h in [primaryWeapon player,secondaryWeapon player,handgunWeapon player]) then {  
				player selectWeapon life_curWep_h;  
			};  
		};  
	};  

	//Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)  
	case _interactionKey:  
	{  
		if(!life_action_inUse) then {  
			[] spawn   
			{  
				private["_handle"];  
				_handle = [] spawn life_fnc_actionKeyHandler;  
				waitUntil {scriptDone _handle};  
				life_action_inUse = false;  
			};  
		};  
	};  

	//Restraining or robbing (Shift + R)  
	case 19:  
	{  
		if(_shift) then {_handled = true;};  
		if(_shift && playerSide == west && !isNull cursorTarget && cursorTarget isKindOf "Man" && (isPlayer cursorTarget) && (side cursorTarget == civilian) && alive cursorTarget && cursorTarget distance player < 3.5 && !(cursorTarget getVariable "Escorting") && !(cursorTarget getVariable "restrained") && speed cursorTarget < 1) then  
		{  
			[] call life_fnc_restrainAction;  
		};  

//Robbing  
		if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && isPlayer cursorTarget && alive cursorTarget && cursorTarget distance player < 4 && speed cursorTarget < 1) then  
		{  
			if((animationState cursorTarget) != "Incapacitated" && (currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable["restrained",false]) && !life_istazed && !(player getVariable["surrender",false])) then  
			{  
				[cursorTarget] spawn life_fnc_knockoutAction;  
			};  
			_handled = true;  
		};  
	};  

	//Knock out, this is experimental and yeah...  
case 34:  
{  
  if(_shift) then {_handled = true;};  
  if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && isPlayer cursorTarget && alive cursorTarget && cursorTarget distance player < 4 && speed cursorTarget < 1) then  
  {  
   if((animationState cursorTarget) != "Incapacitated" && (currentWeapon player == primaryWeapon player OR currentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable["restrained",false]) && !life_istazed) then  
   {  
    [cursorTarget] spawn life_fnc_knockoutAction;  
    if("ItemRadio" in assignedItems cursorTarget) then {  
      cursorTarget removeweapon "ItemRadio";  
      hint "Le telephone de la personne a ete mis au sol.";  
      _defenceplace1 = "Item_ItemRadio" createVehicle (player modelToWorld[0,0,0]);}  
     else { hint "La personne que vous avez assomee n'a pas de telephone !"};  
   };  
  };  
};  

	//Surrender... Shift + J  
	case 36:  
	{  
		if(_shift) then {_handled = true;};  

		if (_shift) then  
		{  
			if (vehicle player == player && !(player getVariable ["restrained", false]) && (animationState player) != "Incapacitated" && !life_istazed) then  
			{  
				if (player getVariable ["surrender", false]) then  
				{  
					player setVariable ["surrender", false, true];  
				} else  
				{  
					[] spawn life_fnc_surrender;  
				};  
			};  
		};  
	};  

	//T Key (Trunk)  
	case 20:  
	{  
		if(!_alt && !_ctrlKey) then  
		{  
			if(vehicle player != player && alive vehicle player) then  
			{  
				if((vehicle player) in life_vehicles) then  
				{  
					[vehicle player] call life_fnc_openInventory;  
				};  
			}  
				else  
			{  
				if((cursorTarget isKindOf "Car" OR cursorTarget isKindOf "Air" OR cursorTarget isKindOf "Ship" OR cursorTarget isKindOf "House_F") && player distance cursorTarget < 7 && vehicle player == player && alive cursorTarget) then  
				{  
					if(cursorTarget in life_vehicles OR {!(cursorTarget getVariable ["locked",true])}) then  
					{  
						[cursorTarget] call life_fnc_openInventory;  
					};  
				};  
			};  
		};  
	};  

	//L Key?  
	case 38:   
	{  
		//If cop run checks for turning lights on.  
		if(_shift && playerSide in [west,independent]) then {  
			if(vehicle player != player && (typeOf vehicle player) in ["C_Offroad_01_F","B_MRAP_01_F","C_SUV_01_F","C_Hatchback_01_F","B_Heli_Light_01_F"]) then {  
				if(!isNil {vehicle player getVariable "lights"}) then {  
					if(playerSide == west) then {  
						[vehicle player] call life_fnc_sirenLights;  
					} else {  
						[vehicle player] call life_fnc_medicSirenLights;  
					};  
					_handled = true;  
				};  
			};  
		};  

		if(!_alt && !_ctrlKey) then { [] call life_fnc_radar; };  
	};  
	//Y Player Menu  
	case 21:  
	{  
		if(!_alt && !_ctrlKey && !dialog) then  
		{  
			[] call life_fnc_p_openMenu;  
		};  
	};  

	//F Key  
	case 33:  
	{  
		if(playerSide in [west,independent] && vehicle player != player && !life_siren_active && ((driver vehicle player) == player)) then  
		{  
			[] spawn  
			{  
				life_siren_active = true;  
				sleep 4.7;  
				life_siren_active = false;  
			};  
			_veh = vehicle player;  
			if(isNil {_veh getVariable "siren"}) then {_veh setVariable["siren",false,true];};  
			if((_veh getVariable "siren")) then  
			{  
				titleText [localize "STR_MISC_SirensOFF","PLAIN"];  
				_veh setVariable["siren",false,true];  
			}  
				else  
			{  
				titleText [localize "STR_MISC_SirensON","PLAIN"];  
				_veh setVariable["siren",true,true];  
				if(playerSide == west) then   
				{  
					[[_veh],"life_fnc_copSiren",nil,true] spawn life_fnc_MP;  
				} else   

				{  

					[[_veh],"life_fnc_medicSiren",nil,true] spawn life_fnc_MP;  
				};  
			};  
		};  
	};  
	//U Key  
	case 22:  
	{  
		if(!_alt && !_ctrlKey) then {  
			if(vehicle player == player) then {  
				_veh = cursorTarget;  
			} else {  
				_veh = vehicle player;  
			};  

			if(_veh isKindOf "House_F" && playerSide == civilian) then {  
				if(_veh in life_vehicles && player distance _veh < 8) then {  
					_door = [_veh] call life_fnc_nearestDoor;  
					if(_door == 0) exitWith {hint localize "STR_House_Door_NotNear"};  
					_locked = _veh getVariable [format["bis_disabled_Door_%1",_door],0];  
					if(_locked == 0) then {  
						_veh setVariable[format["bis_disabled_Door_%1",_door],1,true];  
						_veh animate [format["door_%1_rot",_door],0];  
						systemChat localize "STR_House_Door_Lock";  
					} else {  
						_veh setVariable[format["bis_disabled_Door_%1",_door],0,true];  
						_veh animate [format["door_%1_rot",_door],1];  
						systemChat localize "STR_House_Door_Unlock";  
					};  
				};  
			} else {  
				_locked = locked _veh;  
				if(_veh in life_vehicles && player distance _veh < 8) then {  
					if(_locked == 2) then {  
						if(local _veh) then {  
							_veh lock 0;  
						} else {  
							[[_veh,0],"life_fnc_lockVehicle",_veh,false] spawn life_fnc_MP;  
						};  
						systemChat localize "STR_MISC_VehUnlock";  
						player say3D "carunlock";  
					} else {  
						if(local _veh) then {  
							_veh lock 2;  
						} else {  
							[[_veh,2],"life_fnc_lockVehicle",_veh,false] spawn life_fnc_MP;  
						};	  
						systemChat localize "STR_MISC_VehLock";  
						player say3D "carlock";  
					};  
				};  
			};  
		};  
	};  

//Shift+O Zipties ( Civilians can restrain )  
case 24:  
{  
  if(_shift) then {_handled = true;};  
  if(_shift && playerSide == civilian && !isNull cursorTarget && cursorTarget isKindOf "Man" && (isPlayer cursorTarget) && (side cursorTarget in [civilian,independent]) && alive cursorTarget && cursorTarget distance player < 3.5 && !(cursorTarget getVariable "Escorting") && !(cursorTarget getVariable "restrained") && speed cursorTarget < 1) then  
  {  
   if([false,"zipties",1] call life_fnc_handleInv) then  
    {  
    [] call life_fnc_restrainAction;  
    hint "Vous l'avez menotté, utilisez votre touche action pour plus d'options";  
   }  
   else  
   {  
    hint "Vous n'avez pas de menottes !";  
   };  
  };  
};  

//Protection anti-déconnexion  
case 62:  
    {  
    if(_alt && !_shift) then {  
    diag_log format ["ATTENTION : %1 a appuyé sur ALT+F4 afin de pouvoir se déconnecter (informez-en les administrateurs au plus vite)",player getVariable["realname",name player]];  
    [[1,format["ATTENTION : %1 a appuyé sur ALT+F4  afin de pouvoir se déconnecter (informez-en les administrateurs au plus vite)",player getVariable["realname",name player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };  
case 211:  
    {  
    if(_ctrlKey && _alt)  then {  
    diag_log format ["ATTENTION : %1 a appuyé sur CTRL + ALT + DEL afin de pouvoir probablement se déconnecter (informez-en les administrateurs au plus vite)",player getVariable["realname",name player]];  
    [[1,format["ATTENTION : %1 a appuyé sur CTRL + ALT + DEL  afin de pouvoir probablement se déconnecter (informez-en les administrateurs au plus vite)",player getVariable["realname",name player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };  
 case 1:  
    {  
    if( _ctrlKey )  then {  
    diag_log format ["ATTENTION : %1 a appuyé sur CTRL + ESC afin de pouvoir probablement se déconnecter (informez-en les administrateurs au plus vite)",player getVariable["realname",name player]];  
    [[1,format["ATTENTION : %1 a appuyé sur CTRL + ESC afin de pouvoir probablement se déconnecter (informez-en les administrateurs au plus vite)",player getVariable["realname",name player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP;  
    };  
    };  

		//Takwondo(Traditional Martial arts in korea)(Shift + Num 1)  
case 79:  
{  
	if(_shift) then {_handled = true;};  
		if ((_shift) && (vehicle player == player)) then  
		{  
			cutText [format["Takwondo!!!"], "PLAIN DOWN"];  
			player playMove "AmovPercMstpSnonWnonDnon_exerciseKata";  
		};  
};  

//Kneebend Slow(Shift + Num 2)  
case 80:  
{  
	if(_shift) then {_handled = true;};  
		if ((_shift) && (vehicle player == player)) then  
		{  
			cutText [format["KneeBend Slow baby~"], "PLAIN DOWN"];  
			player playMove "AmovPercMstpSnonWnonDnon_exercisekneeBendA";  
		};  
};  

//Kneebend Fast(Shift + Num 3)  
case 81:  
{  
	if(_shift) then {_handled = true;};  
		if ((_shift) && (vehicle player == player)) then  
		{  
			cutText [format["KneeBend more Hard!!!Move!!Move!!"], "PLAIN DOWN"];  
			player playMove "AmovPercMstpSnonWnonDnon_exercisekneeBendB";  
		};  
};  

//Pushup(Shift + Num 4)  
case 75:  
{  
	if(_shift) then {_handled = true;};  
		if ((_shift) && (vehicle player == player)) then  
		{  
			cutText [format["Pushup!!!!!!"], "PLAIN DOWN"];  
			player playMove "AmovPercMstpSnonWnonDnon_exercisePushup";  
		};  
};  

//C Key + shift  
    case 46:  
    {      
        if(_shift && (!life_action_inUse) && (vehicle player == player) ) then  
        {  
            {  
                _str = [_x] call life_fnc_varToStr;  
                _val = missionNameSpace getVariable _x;  
                if(_val > 0 ) then  
                {  
                    if( _str == "Spitzhacke" || _str == "pickaxe" || _str == "pioche" ) then  
                    {  
                        [] spawn life_fnc_pickAxeUse;  
                    };  
                };  
            } foreach life_inv_items;  
        }  
    };  

//Gendarme - Ouvrir les barrières  
case 23:  
	{  
		if (!_shift && !_alt && !_ctrlKey && (playerSide == west) && (vehicle player != player)) then {  
			[] call life_fnc_ouvrirBarriere;  
		};  
	};  
};  

_handled;  
/*  
	File: fn_catchTurtle.sqf  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Catches a dead turtle?  
*/  
private["_obj"];  
_obj = cursorTarget;  
if(isNull _obj) exitWith {}; //Not valid  
if(alive _obj) exitWith {}; //It's alive, don't take it charlie!  

if(([true,"turtle",1] call life_fnc_handleInv)) then  
{  
	deleteVehicle _obj;  
	titleText[localize "STR_NOTF_CaughtTurtle","PLAIN"];  
};  

le premier fichier c’est pas le bon…

a oui desoler

#include <macro.h>  
/*  
	File: fn_actionKeyHandler.sqf  
	Author: Bryan "Tonic" Boardwine  

	Description:  
	Master action key handler, handles requests for picking up various items and  
	interacting with other players (Cops = Cop Menu for unrestrain,escort,stop escort, arrest (if near cop hq), etc).  
*/  
private["_curTarget","_isWater"];  
_curTarget = cursorTarget;  
if(life_action_inUse) exitWith {}; //Action is in use, exit to prevent spamming.  
if(life_interrupted) exitWith {life_interrupted = false;};  
_isWater = surfaceIsWater (getPosASL player);  
if(isNull _curTarget) exitWith {  
	if(_isWater) then {  
		private["_fish"];  
		_fish = (nearestObjects[getPos player,["Fish_Base_F"],3]) select 0;  
		if(!isNil "_fish") then {  
			[_fish] call life_fnc_catchFish;  
		};  
	};  
};  

if(_curTarget isKindOf "House_F" && {player distance _curTarget < 12} OR ((nearestObject [[16019.5,16952.9,0],"Land_Dome_Big_F"]) == _curTarget OR (nearestObject [[16019.5,16952.9,0],"Land_Research_house_V1_F"]) == _curTarget)) exitWith {  
	[_curTarget] call life_fnc_houseMenu;  
};  

if(dialog) exitWith {}; //Don't bother when a dialog is open.  
if(vehicle player != player) exitWith {}; //He's in a vehicle, cancel!  
life_action_inUse = true;  

//Temp fail safe.  
[] spawn {  
	sleep 60;  
	life_action_inUse = false;  
};  

//Check if it's a dead body.  
if(_curTarget isKindOf "Man" && {!alive _curTarget} && {playerSide in [west,independent,civilian]}) exitWith {  
	//Hotfix code by ins0  
	if(((playerSide == blufor && {(call life_revive_cops)}) || playerSide == independent || playerSide == civilian) && {"Medikit" in (items player)}) then {  
		[_curTarget] call life_fnc_revivePlayer;  
	};  
};  

//If target is a player then check if we can use the cop menu.  
if(isPlayer _curTarget && _curTarget isKindOf "Man") then {  
	if((_curTarget getVariable["restrained",false]) && !dialog && playerSide == west) then {  
		[_curTarget] call life_fnc_copInteractionMenu;  

};  
if((_curTarget getVariable["restrained",false]) && !dialog && playerSide == civilian && cursorTarget distance player < 1.5) then {  
	[_curTarget] call life_fnc_civInteractionMenu;  
	};  
} else {  
	//OK, it wasn't a player so what is it?  
	private["_isVehicle","_miscItems","_money"];  
	_isVehicle = if((_curTarget isKindOf "landVehicle") OR (_curTarget isKindOf "Ship") OR (_curTarget isKindOf "Air")) then {true} else {false};  
	_miscItems = ["Land_BottlePlastic_V1_F","Land_TacticalBacon_F","Land_Can_V3_F","Land_CanisterFuel_F","Land_Suitcase_F"];  
	_animalTypes = ["Salema_F","Ornate_random_F","Mackerel_F","Tuna_F","Mullet_F","CatShark_F","Turtle_F"];  
	_money = "Land_Money_F";  

	//It's a vehicle! open the vehicle interaction key!  
	if(_isVehicle) then {  
		if(!dialog) then {  
			if(player distance _curTarget < ((boundingBox _curTarget select 1) select 0) + 2) then {  
				[_curTarget] call life_fnc_vInteractionMenu;  
			};  
		};  
	} else {  
		//Is it a animal type?  
		if((typeOf _curTarget) in _animalTypes) then {  
			if((typeOf _curTarget) == "Turtle_F" && !alive _curTarget) then {  
				private["_handle"];  
				_handle = [_curTarget] spawn life_fnc_catchTurtle;  
				waitUntil {scriptDone _handle};  
			} else {  
				private["_handle"];  
				_handle = [_curTarget] spawn life_fnc_catchFish;  
				waitUntil {scriptDone _handle};  
			};  
		} else {  
			//OK, it wasn't a vehicle so let's see what else it could be?  
			if((typeOf _curTarget) in _miscItems) then {  
				//OK, it was a misc item (food,water,etc).  
				private["_handle"];  
				_handle = [_curTarget] spawn life_fnc_pickupItem;  
				waitUntil {scriptDone _handle};  
			} else {  
				//It wasn't a misc item so is it money?  
				if((typeOf _curTarget) == _money && {!(_curTarget getVariable["inUse",false])}) then {  
					private["_handle"];  
					_curTarget setVariable["inUse",TRUE,TRUE];  
					_handle = [_curTarget] spawn life_fnc_pickupMoney;  
					waitUntil {scriptDone _handle};  
				};  
			};  
		};  
	};  
};  

est-ce que l’objet turtle existe bien dans varHandle et varToStr ?

oui tout y est

Tout à l’air correcte.

Donc si vraiment ça bug et que ce n’est pas dans ta tête,

T’as plus qu’à débugguer toi même à coup de diag_log, et vérifier tes logs.

vous allez me traiter d’inculte mais comment ont fait pour verifier les logs

ya un fichier côté client et un fichier côté serveur.

Côté client normalement c’est : C:\Users\TONUTILISATEUR\AppData\Local\Arma 3

côté serveur ça dépend. Chez Nitrado c’est dans le dossier Arma3/Config

tu trie par date de modification pour avoir ton fichier de log le plus récent et tu l’ouvre avec ton éditeur de texte favori

dac merci