Jump to content

Help, Custom Loot Breaks Server?


OMGitzSteveo

Recommended Posts

Hey guys,

 

Weird issue, When adding custom weapons to spawn on my server it breaks with errors such as this 

 

ErrorMessage: File z\addons\dayz_code\Configs\CfgLoot\Groups\Weapons.hpp, line 172: Config: '{' after machineguns[] = {L_F

 

Screenshot below is of the //Overwatch loot i have created 

 

If i do not add the ACR weapons the server works fine. Does anyone know why adding the below breaks the server with that error? 

 

    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_IRN_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_IRN_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_IRN_GL_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO_GL_F,
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO_GL_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_F,
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_GL_F}

Screenshot_1.png

Link to comment
Share on other sites

1 hour ago, OMGitzSteveo said:

Hey guys,

 

Weird issue, When adding custom weapons to spawn on my server it breaks with errors such as this 

 

ErrorMessage: File z\addons\dayz_code\Configs\CfgLoot\Groups\Weapons.hpp, line 172: Config: '{' after machineguns[] = {L_F

 

Screenshot below is of the //Overwatch loot i have created 

 

If i do not add the ACR weapons the server works fine. Does anyone know why adding the below breaks the server with that error? 

 

    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_IRN_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_IRN_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_IRN_GL_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_CCO_GL_F,
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_RCO_GL_F},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_F,
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_GL},
    {Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_GL_F}

Screenshot_1.png

Line 169 is a } missing.

Edit//

Also Line 175.

 

 

Link to comment
Share on other sites

WOW. 2 hours i was staring at that for. Amazing how you go blind and a fresh pair of eyes spots the issue right away.

27 minutes ago, SryImAnooB said:

Line 169 is a } missing.

 

Thanks a lot man. Was looking at that config for hours. Amazing how quick a fresh set of eyes can see little things.

 

Although, The server now works but i am met with a lot more errors Such as

 

15:01:35 Error in expression <0) == 1} do

{

_sub = dz_loot_weighted select (_def select 1);

_def = dz_loot_d>

15:01:35 Error position: <select (_def select 1);

_def = dz_loot_d>

15:01:35 Error Zero divisor

15:01:35 File z\addons\dayz_code\loot\select.sqf, line 32

15:01:35 Error in expression <floor random count _weighted);

 

while {(_def select 0) == 1} do

{

_sub = dz_lo>

15:01:35 Error position: <_def select 0) == 1} do

{

_sub = dz_lo>

15:01:35 Error Undefined variable in expression: _def

15:01:35 File z\addons\dayz_code\loot\select.sqf, line 30

15:01:35 Error in expression <andom count _sub);

};

 

_result set [_i, _def];

};

 

 

I have not touched this file in any way shape or form. Also, no overwatch weapons seem to be spawning as loot still 

 

 

Link to comment
Share on other sites

24 minutes ago, OMGitzSteveo said:

WOW. 2 hours i was staring at that for. Amazing how you go blind and a fresh pair of eyes spots the issue right away.

 

Thanks a lot man. Was looking at that config for hours. Amazing how quick a fresh set of eyes can see little things.

 

Although, The server now works but i am met with a lot more errors Such as

 

15:01:35 Error in expression <0) == 1} do

{

_sub = dz_loot_weighted select (_def select 1);

_def = dz_loot_d>

15:01:35 Error position: <select (_def select 1);

_def = dz_loot_d>

15:01:35 Error Zero divisor

15:01:35 File z\addons\dayz_code\loot\select.sqf, line 32

15:01:35 Error in expression <floor random count _weighted);

 

while {(_def select 0) == 1} do

{

_sub = dz_lo>

15:01:35 Error position: <_def select 0) == 1} do

{

_sub = dz_lo>

15:01:35 Error Undefined variable in expression: _def

15:01:35 File z\addons\dayz_code\loot\select.sqf, line 30

15:01:35 Error in expression <andom count _sub);

};

 

_result set [_i, _def];

};

 

 

I have not touched this file in any way shape or form. Also, no overwatch weapons seem to be spawning as loot still 

 

 

i edited my post also } missing in line 175

Link to comment
Share on other sites

1 hour ago, SryImAnooB said:

i edited my post also } missing in line 175

Yep spotted that bugger after you pointed out the other one thanks. Now I'm just stuck on these new errors and why overwatch stuff won't spawn.

 

*Edit*

Fixed that spam of errors. Still no overwatch loot spawning :( 

Link to comment
Share on other sites

Have you pointed the include in description.ext to your new custom files?

Took me 3 friggen hours trying to get overwatch loot before it finally clicked that I'd earlier replaced my description.ext with a new one and had forgotten to point to the custom  loot files again. 

Link to comment
Share on other sites

17 hours ago, lwbuk said:

Have you pointed the include in description.ext to your new custom files?

Took me 3 friggen hours trying to get overwatch loot before it finally clicked that I'd earlier replaced my description.ext with a new one and had forgotten to point to the custom  loot files again. 

 

Hmm? I havent made a new loot file, Just added some extra to the default loot file 

Link to comment
Share on other sites

3 hours ago, lwbuk said:

But you need to move them server side, other wise your changes won't work.

 

 

Well that explains it haha. Thanks man. Do you know what to edit to punch all the loot spawns up a bit? They're currently woeful 

 

Is it just as simple as punching the numbers up per weapon? Example,

 

{Loot_WEAPON,        0.4,        FHQ_ACR_WDL_HWS_GL_F}

 

Change 0.4 to something like this {Loot_WEAPON,        0.8,        FHQ_ACR_WDL_HWS_GL_F}

 

I assume 0.1 is the lowest possible and 1 is the highest? 

Link to comment
Share on other sites

 I have some on 2, but I dont know how high you can actually go. Im not sure exactly what that number represents. In the examples in lootdefines, there are some on 4.

Bust basically yes, increase the chance per weapon, but you can also increase the chance per location, so you can make more mil weapons spawn in mil places and less in residential for example.

 

Link to comment
Share on other sites

  • 1 month later...

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
  • Advertisement
  • Discord

×
×
  • Create New...