Jump to content

Several Code "Bugs"


He-Man

Recommended Posts

To prevent to much forum Topics, I open one Topic, where we can report smaller code bugs, that we found.

I hope this is okay?!

Here my first "bug":

In epoch_code\compile\setup\masterLoop\init.sqf:
 

Spoiler

_masterConfig = 'CfgBuildingLootPos' call EPOCH_returnConfig;

...

...

_buildingJammerRange = getNumber(_masterConfig >> "buildingJammerRange");

but the buildingJammerRange is in CfgEpochClient, so it have to be:

Spoiler

_config = 'CfgEpochClient' call EPOCH_returnConfig;

...

...

_buildingJammerRange = getNumber(_Config >> "buildingJammerRange");

 

Link to comment
Share on other sites

  • 1 month later...

EPOCH_isBuildAllowed.sqf:

Spoiler

if (getNumber(_config >> "buildingNearbyMilitary") == 0) then{
    _range = getNumber(_config >> "buildingNearbyMilitaryRange");
    if (_range > 0) then {
        _restricted = nearestObjects [player, ["ProtectionZone_Invisible_F","Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], 300];
    } else {
        _restricted = nearestObjects [player, ["Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], _range];
        _restricted append (nearestObjects [player, ["ProtectionZone_Invisible_F","Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], 300]);
    };
} else {
    _restricted = nearestObjects [player, ["ProtectionZone_Invisible_F"], 300];
};

should be

Spoiler

if (getNumber(_config >> "buildingNearbyMilitary") == 0) then{
    _range = getNumber(_config >> "buildingNearbyMilitaryRange");
    if (_range > 0) then {
        _restricted = nearestObjects [player, ["Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], _range];
        _restricted append (nearestObjects [player, ["ProtectionZone_Invisible_F"], 300]);
    } else {
        _restricted = nearestObjects [player, ["ProtectionZone_Invisible_F","Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"], 300];
    };
} else {
    _restricted = nearestObjects [player, ["ProtectionZone_Invisible_F"], 300];
};

Or am I wrong?
 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...