RS30002 28 Posted February 20, 2022 Hey all so, i'm trying to integrate lockpicking and running into difficulties (lol) It says "script functions\actions not found" but \actions is a folder in which there is the lockpicking script. Demo mission works flawlessly and i'm pretty sure i copied everything. Hunch says something doesn't initialize, idk.... here's my description, if anyone can please glance over it a little bit, specifically the parts at the bottom, the #include Should that go somewhere else? So far everything has worked...stuff for lockpicking is #include "function_library.hpp #include "common.hpp #include "hud\hud_master.hpp" Spoiler onLoadMission = ""; onLoadIntroTime = 1; author="RS30002"; OnLoadName = "High Seas"; loadScreen = "intro.jpg"; respawn = "BASE"; respawnDelay = 5; respawnDialog = false; class Extended_InitPost_EventHandlers { class CAManBase { init = "_this call (compile preprocessFileLineNumbers 'postInitXEH.sqf')"; }; }; class CfgFunctions { #include "function_library.hpp" #include "INC_undercover\cfgFunctions.hpp" #include "scripts\GOM\functions\GOM_fnc_functions.hpp" }; class CfgRemoteExec { class Functions { mode = 2; jip = 1; #include "INC_undercover\functionsWhitelist.hpp" }; }; class CfgSounds { sounds[] = {Xian,click_sl}; class sound1 { name = "Xian"; sound[] = {"music\Xian.ogg",db+20,1,1,30,1,1,1,0}; //The 18 indicates the distance at which the sound will be heard; titles[] = {}; }; class click_sl { name = "click_sl"; sound[] = {"\music\click_sl.ogg", 1, 1}; titles[] = {1, ""}; }; }; class CfgMusic { sounds[] = {TopGun,GLAtheme5,DangerZone,Anno2205GlobalUnionAnthem,Anno2205TheAlgorithm}; class 01 { name = "TopGun"; sound[] = {"music\TopGun.ogg", db+20, 1.0}; titles[] = {0,""}; }; class 02 { name = "GLAtheme5"; sound[] = {"music\GLAtheme5.ogg", db+10, 1.0}; titles[] = {0,""}; }; class 03 { name = "DangerZone"; sound[] = {"music\DangerZone.ogg", db+20, 1.0}; titles[] = {0,""}; }; class 04 { name = "Anno2205GlobalUnionAnthem"; sound[] = {"music\Anno2205GlobalUnionAnthem.ogg", db+20, 1.0}; titles[] = {0,""}; }; class Anno2205TheAlgorithm { name = "Anno2205TheAlgorithm"; sound[] = {"music\Anno2205TheAlgorithm.ogg", db+10, 1.0}; titles[] = {0,""}; }; }; #include "downloadData.hpp" class CfgCommunicationMenu { #include "scripts\GOM\functions\GOM_fnc_aircraftLoadoutMenu.hpp" }; #include "scripts\GOM\dialogs\GOM_dialog_parents.hpp" #include "scripts\GOM\dialogs\GOM_dialog_controls.hpp" #include "common.hpp" #include "hud\hud_master.hpp" The part where i found the path described above is in a separate file called function_library and it's like this: Spoiler class CfgFunctions { class pizza { class action_functions { file = "functions\actions"; class lockpick; }; class handler_functions { file = "functions\handlers"; class handler_actions; class handler_keydown; class handler_keyup; class initEventHandlers; }; class generic_functions { file = "functions\generic"; class findTargetSelection; }; class hud_functions { file = "hud\functions"; class hud_lockpick; }; }; }; and init playerlocal is: Spoiler // Setup event handlers [] call pizza_fnc_initEventhandlers; // Actions player addAction ["Lockpick", {[(call pizza_fnc_findTargetSelection) select 0] call pizza_fnc_lockpick}, [], 1, false, true, "", "(((call pizza_fnc_findTargetSelection) select 1) find 'door') >= 0"]; Many thanks for any insight. I know it probably looks like a mess 🙂 Share this post Link to post Share on other sites
alpha993 122 Posted February 20, 2022 At first glance, it looks like you're declaring the CfgFunctions class twice with your 'includes.' This... class CfgFunctions { #include "function_library.hpp" }; ...plus this... class CfgFunctions { class pizza { class action_functions { file = "functions\actions"; class lockpick; }; }; }; ...will get you this: class CfgFunctions { class CfgFunctions { class pizza { class action_functions { file = "functions\actions"; class lockpick; }; }; }; }; _____________________________ If you have multiple .hpp files, you should just have the one CfgFunctions class in your description.ext, include the .hpp files like you did, but remove the CfgFunctions classes from the .hpp files. Naturally, you should triple check all your paths to make sure everything is pointing to the correct directory as well. 2 Share this post Link to post Share on other sites
RS30002 28 Posted February 21, 2022 4 hours ago, alpha993 said: If you have multiple .hpp files, you should just have the one CfgFunctions class in your description.ext, include the .hpp files like you did, but remove the CfgFunctions classes from the .hpp files. Naturally, you should triple check all your paths to make sure everything is pointing to the correct directory as well. Owwwww, it works!!!! I removed the first line "class CfgFunctions {" and the last "}" from the function library file. Yaaaay!!! Many, many thanks for your time, i really thought this was a bridge too far for my knowledge, but really wanted this script because it has a nice mini game feel to it. 1 Share this post Link to post Share on other sites
alpha993 122 Posted February 21, 2022 Glad I could help! 🙂 1 Share this post Link to post Share on other sites