Jump to content

Recommended Posts

Hello

 

I have 10 extra mission at my wasteland server. but 4 of them isn´t working, can you mayb help me out. have tryed 2 days now and my hair is grey right now. have tryed with _nbUnits and without. 

 

from log:

16:44:32 "WASTELAND SERVER - Extra Mission started: Weapon Smugglers"
16:44:33 Error in expression <eGroup CIVILIAN;
[_aiGroup,_missionPos, _nbUnits] call smugglerGroup;

_aiGroup >
16:44:33   Error position: <_nbUnits] call smugglerGroup;

_aiGroup >
16:44:33   Error Undefined variable in expression: _nbunits
16:44:33 File mpmissions\__cur_mp.Malden\server\missions\extraMissions\mission_Smugglers.sqf, line 49

 

mission_Smugglers.sqf, line 49

    [_aiGroup, _missionPos, _nbUnits] call smugglerGroup;

 

smugglerGroup.sqf:

 

if (!isServer) exitWith {};

private ["_group", "_pos", "_leader", "_man2", "_man3", "_man4", "_man5", "_man6", "_man7", "_man8", "_man9", "_man10"];

_group = _this select 0;
_pos = _this select 1;

// Leader
_leader = _group createUnit ["C_man_polo_1_F", [(_pos select 0) + 10, _pos select 1, 0], [], 1, "Form"];
_leader addUniform "U_IG_leader";
_leader addVest "V_TacVestIR_blk";
_leader addBackpack "B_AssaultPack_blk";
_leader addMagazine "30Rnd_556x45_Stanag";
_leader addWeapon "arifle_TRG21_F";
_leader addPrimaryWeaponItem "optic_Holosight";
_leader addMagazine "30Rnd_556x45_Stanag";
_leader addMagazine "30Rnd_556x45_Stanag";
_leader addMagazine "Titan_AA";
_leader addWeapon "launch_Titan_F";
_leader addMagazine "Titan_AA";
_leader selectWeapon "launch_Titan_F";

 

Mission:

 

// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//    @file Name: mission_Smugglers.sqf
//    @file Author: JoSchaap, AgentRev, LouD

if (!isServer) exitwith {};
#include "extraMissionDefines.sqf";

private ["_positions", "_smugglerVeh", "_vehicle1", "_vehicle2", "_boxes1", "_currBox1", "_box1", "_boxes2", "_currBox2", "_box2", "_cashrandomizera", "_cashamountrandomizera", "_cashpilerandomizera", "_casha", "_cashamounta", "_cashpilea", "_cashrandomizerb", "_cashamountrandomizerb", "_cashpilerandomizerb", "_cashb", "_cashamountb", "_cashpileb", "_cash1", "_cash2"];

_setupVars =
{
    _missionType = "Weapon Smugglers";
    _locationsArray = MissionSpawnMarkers;
    _nbUnits = if (missionDifficultyHard) then { AI_GROUP_LARGE } else { AI_GROUP_MEDIUM };
};

_setupObjects =
{
    _missionPos = markerPos _missionLocation;
    _smugglerVeh = ["B_G_Offroad_01_armed_F"] call BIS_fnc_selectRandom; 

    _vehicle1 = [_smugglerVeh,[(_missionPos select 0) - 5, (_missionPos select 1) + 10,0],0.5,1,0,"NONE"] call createMissionVehicle;
    _vehicle1 setVariable [call vChecksum, true, false];
    _vehicle1 setFuel 1;
    _vehicle1 setVehicleLock "UNLOCKED";
    _vehicle1 setVariable ["R3F_LOG_disabled", false, true];
    
    _vehicle2 = [_smugglerVeh,[(_missionPos select 0) - 5, (_missionPos select 1) - 10,0],0.5,1,0,"NONE"] call createMissionVehicle;
    _vehicle2 setVariable [call vChecksum, true, false];
    _vehicle2 setFuel 1;
    _vehicle2 setVehicleLock "UNLOCKED";
    _vehicle2 setVariable ["R3F_LOG_disabled", false, true];
    
    _boxes1 = ["Box_IND_Wps_F","Box_NATO_Wps_F","Box_IND_WpsLaunch_F"];
    _currBox1 = _boxes1 call BIS_fnc_selectRandom;
    _box1 = createVehicle [_currBox1,[(_missionPos select 0), (_missionPos select 1),0],[], 0, "NONE"];
    _box1 allowDamage false;
    _box1 setVariable ["R3F_LOG_disabled", true, true];
    
    _boxes2 = ["Box_IND_Wps_F","Box_NATO_Wps_F","Box_IND_WpsLaunch_F"];
    _currBox2 = _boxes2 call BIS_fnc_selectRandom;
    _box2 = createVehicle [_currBox2,[(_missionPos select 0) - 5, (_missionPos select 1) - 8,0],[], 0, "NONE"];
    _box2 allowDamage false;
    _box2 setVariable ["R3F_LOG_disabled", true, true];
    
    _aiGroup = createGroup CIVILIAN;
    [_aiGroup,_missionPos, _nbUnits] call smugglerGroup;

    _aiGroup setCombatMode "RED";
    _aiGroup setBehaviour "COMBAT";
    
    _missionPicture = getText (configFile >> "CfgVehicles" >> _smugglerVeh >> "picture");
    
    _missionHintText = format ["A group of weapon smugglers have been spotted. Stop the weapon deal and take their weapons and money.", extraMissionColor];
};
    
_waitUntilMarkerPos = nil;
_waitUntilExec = nil;
_waitUntilCondition = nil;

_failedExec =
{
    // Mission failed
    { deleteVehicle _x } forEach [_box1, _box2, _vehicle1, _vehicle2];
};

_successExec =
{
    // Mission completed
    { _x setVariable ["R3F_LOG_disabled", false, true] } forEach [_box1, _box2];
    { _x setVariable ["A3W_missionVehicle", true] } forEach [_vehicle1, _vehicle2];
    
    //Random fake - real money
    _cashrandomizera = ["money","cmoney","money","cmoney"];
    _cashamountrandomizera = [1000,1500,2000,2500,3000,3500,4000,4500,5000];
    _cashpilerandomizera = [3,5];
        
    _casha = _cashrandomizera call BIS_fnc_SelectRandom;
    _cashamounta = _cashamountrandomizera call BIS_fnc_SelectRandom;
    _cashpilea = _cashpilerandomizera call BIS_fnc_SelectRandom;
    
    for "_i" from 1 to _cashpilea do
    {
        _cash1 = createVehicle ["Land_Money_F",[(_lastPos select 0), (_lastPos select 1) - 5,0],[], 0, "NONE"];
        _cash1 setPos ([_lastPos, [[2 + random 3,0,0], random 360] call BIS_fnc_rotateVector2D] call BIS_fnc_vectorAdd);
        _cash1 setDir random 360;
        _cash1 setVariable [_casha, _cashamounta, true];
        _cash1 setVariable ["owner", "world", true];
    };
    
    _cashrandomizerb = ["money","cmoney","money","cmoney"];
    _cashamountrandomizerb = [1000,1500,2000,2500,3000,3500,4000,4500,5000];
    _cashpilerandomizerb = [3,5];
        
    _cashb = _cashrandomizerb call BIS_fnc_SelectRandom;
    _cashamountb = _cashamountrandomizerb call BIS_fnc_SelectRandom;
    _cashpileb = _cashpilerandomizerb call BIS_fnc_SelectRandom;
    
    for "_i" from 1 to _cashpileb do
    {
        _cash2 = createVehicle ["Land_Money_F",[(_lastPos select 0), (_lastPos select 1) - 5,0],[], 0, "NONE"];
        _cash2 setPos ([_lastPos, [[2 + random 3,0,0], random 360] call BIS_fnc_rotateVector2D] call BIS_fnc_vectorAdd);
        _cash2 setDir random 360;
        _cash2 setVariable [_cashb, _cashamountb, true];
        _cash2 setVariable ["owner", "world", true];
    };
    
    _successHintMessage = format ["The smugglers are dead, the weapons and money are yours!"];
};

_this call extraMissionProcessor;

 

 

what am i doring wrong?

Share this post


Link to post
Share on other sites

Can you show us what extraMissionDefines.sqf and extraMissionProcessor are? I have had  a quick look/grep through A3Wasteland GIT repositories and could not find any mention of them them. All I could find is main and side missions.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×