Sign in to follow this  
Followers 0
dj3hac

question about #include

4 posts in this topic

instead of adding every entry to loot spawn/trader lists am I able to place the entries in a separate .sqf and call it from where i WOULD put the entries? I'll add an example below:

 

lootBackpack_list = [
[ 0, [							// CIVIL
"B_AssaultPack_cbr",
"B_AssaultPack_dgtl",
"B_AssaultPack_khk",
"B_AssaultPack_mcamo",
"B_AssaultPack_ocamo",
"B_AssaultPack_rgr",
"B_AssaultPack_sgg",
"B_Carryall_cbr",
"B_Carryall_khk",
#include things.sqf;
]],[ 1, [						// MILITARY
"B_Carryall_cbr",
"B_Carryall_khk",
"B_Carryall_mcamo",
"B_Carryall_ocamo",
"B_Carryall_oli",
"B_Carryall_oucamo",
#include things.sqf;
]],[ 2, [						// INDUSTRIAL
"B_Carryall_cbr",
"B_Carryall_khk",
"B_Carryall_mcamo",
"B_Carryall_ocamo",
"B_Carryall_oli",
"B_Carryall_oucamo",
#include things.sqf;
]],[ 3, [						// RESEARCH
"B_Carryall_cbr",
"B_Carryall_khk",
"B_Carryall_mcamo",
"B_Carryall_ocamo",
"B_Carryall_oli",
"B_Carryall_oucamo",
#include things.sqf;
]]];

I feel like trouble shooting would be a lot easier if i kept the mod entries separate like this, but I'm not sure exactly how. If I have a list of items thats literally just "item1", "item2", "item3"; would that work, because its called WITHIN the brackets already, or would it have to be in its own brackets and formatted properly.

Basically i guess I'm asking if calling a .sqf file in the same the as literally pasting the entire script where the #include line is. Sorry if this is confusing, it confuses me and I wrote it!

Share this post


Link to post
Share on other sites

I'm not 100% sure I follow what you're asking here.  Hopefully this will help.

 To make traders easier to edit and keep up with, there is this.

For crafting there is this.

For loot tables you can copy the content of CfgBuildings and CfgLootTables into their own files for example buildings.hpp and lootTables.hpp save them to the root of you exile_server_config.pbo and call them in their proper arrays withing config.cpp with:

#include "buildings.hpp"

and:

#include "lootTables.hpp"

Use this post to get a better understanding for the loot tables part.

 

All of this will clean up your configs and make things much more manageable.  

Share this post


Link to post
Share on other sites
Advertisement

I'm now getting this error when starting the server after following the guide. I've double checked everything for missing punctuation / spelling.

jHQAnzT.png

pnyzPG0.png

Share this post


Link to post
Share on other sites

Posted (edited)

I fixed it, or at least narrowed the issue down to my trader.cpp file.

Yup totally fixed, in case anyone is interested:

class MASTools
    {
        name = "MAS Tools";
        icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\itemacc_ca.paa";
        items[] =
        {
            //"NVGoggles_mas_h",
           //"Rangefinder_mas_h",
            //"Laserdesignator_mas_h"
        };
    };

having the items commented out was the same as having no data entered at all, returning an unexpected value of Null.

Edited by dj3hac

Share this post


Link to post
Share on other sites
Advertisement

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.