Frage von Mogno, 20

Kann mir einer sagen wo der Fehler in dem Arma 3 Script ist?

include <macro.h>

/* File: Author: Bryan "Tonic" Boardwine

Description:
Master configuration list / array for buyable vehicles & prices and their shop.

*/ private["_shop","_return"]; _shop = [_this,0,"",[""]] call BIS_fnc_param; if(_shop == "") exitWith {[]}; _return = []; switch (_shop) do { case "kart_shop": { _return = [ ["C_Kart_01_Blu_F",15000], ["C_Kart_01_Fuel_F",15000], ["C_Kart_01_Red_F",15000], ["C_Kart_01_Vrana_F",15000] ]; }; case "med_shop": { _return = [ ["C_Offroad_01_F",10000], ["I_Truck_02_medical_F",25000], ["O_Truck_03_medical_F",45000], ["B_Truck_01_medical_F",60000] ]; };

case "med_air_hs": {
    _return = [
        ["B_Heli_Light_01_F",50000],
        ["O_Heli_Light_02_unarmed_F",75000]
    ];
};

case "civ_car":
{
    _return = 
    [
        ["B_Quadbike_01_F",2500],
        ["C_Offroad_01_F",25000],
        ["C_SUV_01_F",35000],
        ["C_Hatchback_01_F",75000],
        ["C_Van_01_transport_F",80000]
    ];
};

case "civ_truck":
{
    _return =
    [
        ["C_Van_01_box_F",100000],
        ["I_Truck_02_transport_F",200000],
        ["I_Truck_02_covered_F",250000],
        ["O_Truck_03_transport_F",1295000],
        ["O_Truck_03_covered_F",2325000],
        ["B_Truck_01_transport_F",2335000],
        ["B_Truck_01_box_F",3450000],
        ["O_Truck_03_device_F",5450000]
    ];  
};


case "reb_car":
{
    _return =
    [
        ["B_Quadbike_01_F",2500],
        ["B_G_Offroad_01_F",27500],
        ["O_MRAP_02_F",757000],
        ["B_Heli_Light_01_F",345000]
    ];

    if(license_civ_rebel) then
    {
        _return pushBack
        ["B_G_Offroad_01_armed_F",950000];
    };
};

case "cop_car":
{
    _return pushBack
    ["C_Offroad_01_F",8000];
    _return pushBack
    ["C_SUV_01_F",10000];
    if(__GETC__(life_coplevel) > 2) then
    {
        _return pushBack
        ["B_MRAP_01_F",45000];
    };
};

case "civ_air":
{
    _return =
    [
        ["B_Heli_Light_01_F",333000],
        ["O_Heli_Light_02_unarmed_F",957000]
    ];
};

case "cop_air":
{
    _return pushBack
    ["B_Heli_Light_01_F",75000];
    if(__GETC__(life_coplevel) > 2) then
    {
        _return pushBack
        ["B_Heli_Transport_01_F",400000];
    };
};

case "cop_airhq":
{
    _return pushBack
    ["B_Heli_Light_01_F",75000];
    if(__GETC__(life_coplevel) > 2) then
    {
        _return pushBack
        ["B_Heli_Transport_01_F",400000];
        _return pushBack
        ["B_MRAP_01_hmg_F",750000];
    };
};

case "civ_ship":
{
    _return =
    [
        ["C_Rubberboat",5000],
        ["C_Boat_Civil_01_F",22000]
    ];
};

case "cop_ship":
{
    _return =
    [
        ["B_Boat_Transport_01_F",13000],
        ["C_Boat_Civil_01_police_F",20000];
        if(__GETC__(life_coplevel) > 5) then
    {
        _return pushBack
        ["B_SDV_01_F",400000];
    };
    ];
};

};

_return;

Antwort
von DragonFireX, 6

Dein Fehler befindet sich in dem letzten Fall, "cop_ship"

case "cop_ship":
{
_return =
[
["B_Boat_Transport_01_F",13000],
["C_Boat_Civil_01_police_F",20000];
if(__GETC__(life_coplevel) > 5) then
{
_return pushBack
["B_SDV_01_F",400000];
};
];
};

So sollte es funktionieren:

case "cop_ship":
{
_return pushBack
["B_Boat_Transport_01_F",13000];
_return pushBack
["C_Boat_Civil_01_police_F",20000];

if(__GETC__(life_coplevel) > 5) then
{
_return pushBack
["B_SDV_01_F",400000];
};
};

Keine passende Antwort gefunden?

Fragen Sie die Community

Weitere Fragen mit Antworten