Adding loot table to LootSystem

Discussion in 'Help Wanted' started by SLIgaming, Aug 9, 2018.

  1. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    7
    So I've added a loot.hpp file and included it to the cpp but im getting a error CfgItemSpawns.Loot member already defined?

    Anything I'm missing?

    Do I need to add a custom class i.e CustomLoot or is this broken ?

    RPT
    Code:
    == C:\SLI_Desolation\arma3server.exe
    == arma3server.exe   -port=2302 -cfg=basic.cfg -config=config.cfg -profiles=public_server -autoinit -enableHT -high -LoadMissionToMemory -mod=@DesolationREDUX;@CUP_Terrains_Core;@CUP_Terrains_Maps;@CUP_Terrains_CWA;@Chernarus_2035;@CBA_A3;@CUP_Weapons;@CUP_Units;@CUP_Vehicles; -serverMod=@DesolationServer;@obfusqf;@arametrics;@infiSTAR_A3;
    
    Original output filename: Arma3Retail_Server
    Exe timestamp: 2018/07/24 22:39:33
    Current time:  2018/08/09 15:48:46
    
    Type: Public
    Build: Stable
    Version: 1.84.144923
    
    Allocator: C:\SLI_Desolation\Dll\tbb4malloc_bi.dll [2017.0.0.0] [2017.0.0.0]
    PhysMem: 64 GiB, VirtMem : 4.0 GiB, AvailPhys : 61 GiB, AvailVirt : 3.9 GiB, AvailPage : 70 GiB
    =====================================================================
    
    15:48:46 SteamAPI initialization failed. Steam features won't be accessible!
    15:48:46 Cannot register unknown string STR_3DEN_CAMERA_NAME
    15:48:46 Cannot register unknown string STR_DIFF_SCENE_ONLY
    15:48:46 Cannot register unknown string STR_DIFF_SCENE_AND_MAP
    15:48:48 Initializing stats manager.
    15:48:48 Stats config disabled.
    15:48:48 sessionID: a5adf5772e81c26d35f4c8cedd308b995f9ecc57
    15:49:31 Item STR_CUP_dss_Soviet_Era_Tanker_Helmet listed twice
    15:49:31 Unexpected stringtable format inside <Text ID="STR_CUP_lib_cz805"><Russian>
    15:49:31 Item str_dn_Mk19_Gun_Bag listed twice
    15:49:31 Item str_dn_Mk19_Tripod_Bag listed twice
    15:49:31 Item str_dn_Mk19_Tripod_Bag listed twice
    15:49:31 Unsupported language English in stringtable
    15:49:31 Item STR_CUP_DN_GSh301 listed twice
    15:49:31 Item str_dn_2b14 listed twice
    15:49:31 Item str_mn_pg9 listed twice
    15:49:31 Item str_mn_og9 listed twice
    15:49:31 Item str_mn_igla listed twice
    15:49:31 Item str_dn_ags30 listed twice
    15:49:31 Item str_mn_at13 listed twice
    15:49:31 Item str_mn_9k32 listed twice
    15:49:31 Item str_dn_at13 listed twice
    15:49:31 Item str_dn_at13launchersingle listed twice
    15:49:31 Item STR_DN_D30 listed twice
    15:49:31 Item str_dn_dshkm listed twice
    15:49:31 Item str_dn_dshkm_minitripod listed twice
    15:49:31 Item str_lib_m2_mg listed twice
    15:49:31 Item str_lib_m119 listed twice
    15:49:31 Item str_lib_kord listed twice
    15:49:31 Item str_lib_dshkm listed twice
    15:49:31 Item STR_LIB_D30 listed twice
    15:49:31 Item str_lib_ags30 listed twice
    15:49:31 Item str_dn_igla_aa_pod_east listed twice
    15:49:31 Item str_dn_igla_twice listed twice
    15:49:31 Item str_dn_kord listed twice
    15:49:31 Item str_dn_kord_low listed twice
    15:49:31 Item str_dn_m119 listed twice
    15:49:31 Item str_dn_tow_tripod listed twice
    15:49:31 Item str_dn_tow listed twice
    15:49:31 Item str_dn_spg9 listed twice
    15:49:31 Item str_dn_m252 listed twice
    15:49:31 Item str_dn_m2hd_minitripod listed twice
    15:49:31 Item str_dn_m2_mg listed twice
    15:49:31 Item str_dn_mk19_tripod listed twice
    15:49:31 Item str_dn_zu23 listed twice
    15:49:31 Item str_lib_2b14 listed twice
    15:49:31 Item str_lib_at13 listed twice
    15:49:31 Item str_lib_m252 listed twice
    15:49:31 Item str_lib_spg9 listed twice
    15:49:31 Unsupported language English in stringtable
    15:49:32 Item str_a3_to_c01_m02_036_ta_mechanized_briefing_SOLDIERC_0 listed twice
    15:49:33 Conflicting addon sz_structures in 'sz_structures\misc\', previous definition in 'sz_structures\'
    15:49:36 ErrorMessage: File LootSystem\Configs\LootTables\CupLoot.hpp, line 3736: /CfgItemSpawns.Loot: Member already defined.
    15:49:36 Application terminated intentionally
    ErrorMessage: File LootSystem\Configs\LootTables\CupLoot.hpp, line 3736: /CfgItemSpawns.Loot: Member already defined.
    =======================================================
    -------------------------------------------------------
    Exception code: 0000DEAD  at 759B5EF8
    Version 1.84.144923
    Fault time: 2018/08/09 15:50:18
    Fault address:  759B5EF8 01:00014EF8 C:\Windows\SYSTEM32\KERNELBASE.dll
    file:    
    world:   
    Prev. code bytes: 75 1F 21 4C 24 10 8D 04 24 50 FF 15 2C 63 A6 75
    Fault code bytes: 8B 4C 24 54 33 CC E8 B1 8D FF FF 8B E5 5D C2 10
    
    Registers:
    EAX:0253BC88 EBX:2F8A2D60
    ECX:00000005 EDX:00000000
    ESI:2F88CBF0 EDI:003DF309
    CS:EIP:0023:759B5EF8
    SS:ESP:002B:0253BC88  EBP:0253BCE0
    DS:002B  ES:002B  FS:0053  GS:002B
    Flags:00000216
    =======================================================
    note: Minidump has been generated into the file public_server\arma3server_2018-08-09_15-48-46.mdmp
     
    Last edited: Aug 9, 2018
  2. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    Would be helpful to see the actual hpp files to check if its a duplicate class.

    Classes should not be copied and pasted without giving a New unique name.

    "Member already defined" comes up when you have got, for example, class ss_hangar defined twice in the included files overall
     
  3. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    7
    CupLoot.hpp
    https://pastebin.com/J7CUe8c7

    config.cpp
    Code:
    class CfgPatches
    {
        class LootSystem {
            units[] = {};
        };
    };
    
    class Plugins
    {
        class LootSystem
        {
            name = "Loot System";
            desc = "Adds loot to your server";
            version = 0.1;
            tag = "LSYS";
        };
    };
    
    class CfgFunctions
    {
        class LSYS
        {
            class Server
            {
                file = "LootSystem\Server";
                isserver = 1;
                class initServer {};
            };
            class Server_Loot
            {
                file = "LootSystem\Server\Loot";
                isserver = 1;
                class lootManager {};
                class spawnLoot {};
                class despawnLoot {};
            };
        };
    };
    
    
    class CfgItemSpawns {
        buildingTypes[] = {"Military","Civilian","Industrial","Commercial","Medical","Mechanical"};
        lootRarity[] = {"rare","semirare","average","semicommon","common"};
        lootTypes[] = {"Weapon","Handgun","Magazine","Food","Drink","Medical","Junk","Backpack","Uniform","Vest","Helmet","Cosmetic","GeneralItem","Construction","Book","Electronic","CarPart","Attachment"};
    
        #include "Configs\LootTables\DesolationLoot.hpp"
        #include "Configs\LootTables\CupLoot.hpp"
        // Add you'r custom loot table files here
       
       
        class Buildings {
           
            #include "Configs\LootPositions\Buildings.hpp"
            #include "Configs\LootPositions\CUPBuildings.hpp"
            #include "Configs\LootPositions\AltisBuildings.hpp"
            #include "Configs\LootPositions\Chernarus2035Buildings.hpp"
            // Add you'r custom loot position files here
           
        };
    };
     
    Last edited: Aug 9, 2018
  4. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    Lemme guess youre having the class loot twice.the classes in all files together have to be unique. So no class loot in bla.hpp AND bla2.hpp
     
    SLIgaming likes this.
  5. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    Name it Class cfgitemspawns {
    Class myloot {.....

    Should work.
     
    SLIgaming likes this.
  6. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    7
    No errors but no loot
     
  7. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    Insert hpp file :)
     
  8. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    Did you solve this and how?

    Always share experience here.
     
  9. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    7
  10. SLIgaming

    SLIgaming Member

    Joined:
    Jan 29, 2017
    Messages:
    59
    Likes Received:
    7
    Only way I've got it to work is by adding to DesolationLoot.hpp else im prompt with that error: CfgItemSpawns.Loot member already defined
     
  11. B.A.D.

    B.A.D. Member

    Joined:
    Dec 21, 2017
    Messages:
    92
    Likes Received:
    20
    Well the only thing that can cause this is something defined twice with the same class name.

    Check again if "class loot" is somwhere twice
     

Share This Page