Hux Posted May 23, 2017 Report Share Posted May 23, 2017 Hello, I'm trying to install a script (GOM Aircraft Loadout). I'm supposed to add this to decription.ext: class CfgFunctions { #include "scripts\GOM\functions\GOM_fnc_functions.hpp" }; But I get a message that cfgFunctions is already defined. I can't figure out what file would already have it defined. There's a cfgFunctions in the mission file but it just doesn't look like the right place... Where would I add this line? Thank you. Link to comment Share on other sites More sharing options...
He-Man Posted May 23, 2017 Report Share Posted May 23, 2017 https://github.com/EpochModTeam/Epoch/blob/release/Sources/epoch_config/Configs/CfgFunctions.hpp vbawol 1 Link to comment Share on other sites More sharing options...
Hux Posted May 23, 2017 Author Report Share Posted May 23, 2017 4 hours ago, He-Man said: https://github.com/EpochModTeam/Epoch/blob/release/Sources/epoch_config/Configs/CfgFunctions.hpp Thanks He-Man. How would I add this line? #include "scripts\GOM\functions\GOM_fnc_functions.hpp" Link to comment Share on other sites More sharing options...
He-Man Posted May 23, 2017 Report Share Posted May 23, 2017 Put your file in the same folder and then: #include "GOM_fnc_functions.h" Link to comment Share on other sites More sharing options...
raymix Posted May 23, 2017 Report Share Posted May 23, 2017 16 hours ago, Hux said: Hello, I'm trying to install a script (GOM Aircraft Loadout). I'm supposed to add this to decription.ext: class CfgFunctions { #include "scripts\GOM\functions\GOM_fnc_functions.hpp" }; But I get a message that cfgFunctions is already defined. I can't figure out what file would already have it defined. There's a cfgFunctions in the mission file but it just doesn't look like the right place... That's because it's already defined here: https://github.com/EpochModTeam/Epoch/blob/release/Sources/epoch_config/Configs/CfgFunctions.hpp You simply need to add your #include line in description.ext without defining cfgFunctions class, that's all. description.ext // Epoch Survival Gamemode #include "epoch_config\sandbox_config.hpp" #include "scripts\GOM\functions\GOM_fnc_functions.hpp" Link to comment Share on other sites More sharing options...
Hux Posted May 24, 2017 Author Report Share Posted May 24, 2017 4 hours ago, raymix said: That's because it's already defined here: https://github.com/EpochModTeam/Epoch/blob/release/Sources/epoch_config/Configs/CfgFunctions.hpp You simply need to add your #include line in description.ext without defining cfgFunctions class, that's all. description.ext // Epoch Survival Gamemode #include "epoch_config\sandbox_config.hpp" #include "scripts\GOM\functions\GOM_fnc_functions.hpp" I did try that but it didn't seem to work. This is what they show for calling it: class CfgFunctions { #include "scripts\GOM\functions\GOM_fnc_functions.hpp" }; #include "scripts\GOM\dialogs\GOM_dialog_parents.hpp" #include "scripts\GOM\dialogs\GOM_dialog_controls.hpp" I tried the way you said by just putting the 3 lines in the description.ext the standard way: #include "scripts\GOM\functions\GOM_fnc_functions.hpp" #include "scripts\GOM\dialogs\GOM_dialog_parents.hpp" #include "scripts\GOM\dialogs\GOM_dialog_controls.hpp" I have scripts folder in my root mission folder and in the scripts folder is the GOM folder. Thanks for the reply. Link to comment Share on other sites More sharing options...
raymix Posted May 24, 2017 Report Share Posted May 24, 2017 Oh, Sh*t, my bad, You need to paste that include inside CfgFunctions.hpp file, inside CfgFunctions{} brackets, but remove brackets that came with the guide. The other 2 lines for parents and controls keep in description.ext To be on the safe side, you should open CfgFunctions.hpp file and GOM_fnc_functions.hpp file side by side. Then look at structure of both carefully. You will need to copy functions over from GOM file into Epoch's CfgFunctions (while maintaining Epoch's structure) to define them properly. Worst case - put both files up in a pastebin and send us links Link to comment Share on other sites More sharing options...
Hux Posted May 26, 2017 Author Report Share Posted May 26, 2017 On 5/24/2017 at 6:23 AM, raymix said: Oh, Sh*t, my bad, You need to paste that include inside CfgFunctions.hpp file, inside CfgFunctions{} brackets, but remove brackets that came with the guide. The other 2 lines for parents and controls keep in description.ext To be on the safe side, you should open CfgFunctions.hpp file and GOM_fnc_functions.hpp file side by side. Then look at structure of both carefully. You will need to copy functions over from GOM file into Epoch's CfgFunctions (while maintaining Epoch's structure) to define them properly. Worst case - put both files up in a pastebin and send us links Hmm, looking at it ,,,maybe I need to make Class GOM? to make it work. I've been over at BIS forum trying many suggestions and I'm stumped. Here's the 2 files: GOM_fnc_functions.hpp: https://pastebin.com/dl/DijD4Cpj CfgFunctions.hpp: https://pastebin.com/dl/7Lhx20yP Thanks for the help raymix. Link to comment Share on other sites More sharing options...
raymix Posted May 26, 2017 Report Share Posted May 26, 2017 make sure scripts folder is in the root of MPMissions /*[[[cog from arma_config_tools import *; json_to_arma()]]]*/ /* @author = "Aaron Clark - https://EpochMod.com"; @contributors[] = {}; @description = "Epoch cfgfunctions"; @licence = "Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike"; @github = "https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgFunctions.hpp"; */ class cfgFunctions { class A3 { tag = "BIS"; class functions { class returnVector { file = "epoch_code\compile\bis_functions\returnVector.sqf"; }; }; }; class EPOCH { tag = "EPOCH"; class functions { class returnConfigEntryV2 { file = "epoch_code\compile\functions\EPOCH_fn_returnConfigEntryV2.sqf"; }; class isAny { file = "epoch_code\compile\both\EPOCH_isAny.sqf"; }; class compiler { file = "epoch_code\compile\both\EPOCH_compiler.sqf"; }; }; class Client { class init { file = "epoch_code\init\fn_init.sqf"; preInit = 1; }; class postinit { file = "epoch_code\init\fn_postinit.sqf"; postInit = 1; }; class aircraftLoadoutInit { file = "scripts\GOM\functions\GOM_fnc_aircraftLoadoutInit.sqf"; preInit = 1; }; }; }; }; /*[[[end]]]*/ Link to comment Share on other sites More sharing options...
Hux Posted May 27, 2017 Author Report Share Posted May 27, 2017 18 hours ago, raymix said: make sure scripts folder is in the root of MPMissions /*[[[cog from arma_config_tools import *; json_to_arma()]]]*/ /* @author = "Aaron Clark - https://EpochMod.com"; @contributors[] = {}; @description = "Epoch cfgfunctions"; @licence = "Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike"; @github = "https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgFunctions.hpp"; */ class cfgFunctions { class A3 { tag = "BIS"; class functions { class returnVector { file = "epoch_code\compile\bis_functions\returnVector.sqf"; }; }; }; class EPOCH { tag = "EPOCH"; class functions { class returnConfigEntryV2 { file = "epoch_code\compile\functions\EPOCH_fn_returnConfigEntryV2.sqf"; }; class isAny { file = "epoch_code\compile\both\EPOCH_isAny.sqf"; }; class compiler { file = "epoch_code\compile\both\EPOCH_compiler.sqf"; }; }; class Client { class init { file = "epoch_code\init\fn_init.sqf"; preInit = 1; }; class postinit { file = "epoch_code\init\fn_postinit.sqf"; postInit = 1; }; class aircraftLoadoutInit { file = "scripts\GOM\functions\GOM_fnc_aircraftLoadoutInit.sqf"; preInit = 1; }; }; }; }; /*[[[end]]]*/ Still not working. The scripts folder is in my mission root and I get no error. I don't see any sign of the script being called in my logs. Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now