Problème d'ajout arme etonnant


#1

Depuis un petit moment j’essai de mettre des armes sur mon serveur, et j’ai des souci avec le serveur. Quand j’ajoute les armes chez les rebelles mon fichier fait planter tous les shop d’armes

, alors que j’utilise un Notepad++ avec un verficateur de language Sqf.

Voici le Weaponshopcfg.sqf en question:

#include <macro.h>

/*

File: fn_weaponShopCfg.sqf  

Author: Bryan "Tonic" Boardwine  

  

Description:  

Master configuration file for the weapon shops.  

  

Return:  

String: Close the menu  

Array:  

[Shop Name,  

[ //Array of items to add to the store  

    [classname,Custom Name (set nil for default),price]  

]]  

*/

private["_shop"];

_shop = [_this,0,"",[""]] call BIS_fnc_param;

if(_shop == “”) exitWith {closeDialog 0}; //Bad shop type passed.

switch(_shop) do

{

case "cop_basic":  

{  

    switch(true) do  

    {  

        case (playerSide != west): {"Vous n'êtes pas Policier!"};  

        default  

        {  

            ["Boutique de Police d'Altis",  

                [  

                    ["hgun_P07_snds_F","Stun Pistol",2000],  

                    ["hgun_P07_F",nil,7500],  

                    ["muzzle_snds_L",nil,650],  

                    ["16Rnd_9x21_Mag",nil,100],  

                    ["arifle_sdar_F","Taser Rifle",20000],  

                    ["20Rnd_556x45_UW_mag","Taser Rifle Magazine",125],  

                    ["HandGrenade_Stone","Flashbang",1700],  

                    ["ItemGPS",nil,100],  

                    ["FirstAidKit",nil,150],  

                    ["Binocular",nil,150],  

                    ["ToolKit",nil,250],  

                    ["Medikit",nil,1000],  

                    ["NVGoggles",nil,2000]  

                ]  

            ];  

        };  

    };  

};  

  

case "med_basic":  

{  

    switch (true) do  

    {  

        case (playerSide != independent): {"Vous n'êtes Pas du SAMU"};  

        default {  

            ["Boutique du SAMU",  

                [  

                    ["ItemGPS",nil,100],  

                    ["Binocular",nil,150],  

                    ["FirstAidKit",nil,150],  

                    ["ToolKit",nil,250],  

                    ["Medikit",nil,500],  

                    ["NVGoggles",nil,1200],  

                    ["B_FieldPack_ocamo",nil,3000]  

                ]  

            ];  

        };  

    };  

};  


case "cop_patrol":  

{  

    switch(true) do  

    {  

        case (playerSide != west): {"Vous n'êtes pas Policier!"};  

        case (__GETC__(life_coplevel) < 2): {"Vous n'avez pas le Rang d'Officier de Patrouille!"};  

        default  

        {  

            ["Boutique d'Officier de Patrouille d'Altis",  

                [  

                    ["SMG_02_ACO_F",nil,30000],  

                    ["30Rnd_9x21_Mag",nil,250],  

                    ["arifle_MX_F",nil,35000],  

                    ["muzzle_snds_H",nil,2750],  

                    ["30Rnd_65x39_caseless_mag",nil,300],  

                    ["HandGrenade_Stone","Flashbang",1700],  

                    ["MineDetector",nil,1000],  

                    ["acc_flashlight",nil,750],  

                    ["optic_Holosight",nil,1200],  

                    ["optic_Arco",nil,2500]  

                ]  

            ];  

        };  

    };  

};  


case "cop_sergeant":  

{  

    switch(true) do  

    {  

        case (playerSide != west): {"Vous n'êtes pas Policier!"};  

        case (__GETC__(life_coplevel) < 3): {"Vous n'avez pas le Rang de Sergent!"};  

        default  

        {  

            ["Boutique des Sergents d'Altis",  

                [  

                    ["SMG_02_ACO_F",nil,15000],  

                    ["30Rnd_9x21_Mag",nil,160],  

                    ["hgun_ACPC2_F",nil,17500],  

                    ["9Rnd_45ACP_Mag",nil,200],  

                    ["arifle_MXC_F",nil,30000],  

                    ["muzzle_snds_H",nil,2750],  

                    ["30Rnd_65x39_caseless_mag",nil,200],  

                    ["srifle_LRR_F",nil,50000],  

                    ["7Rnd_408_Mag"nil,450],  

                    ["HandGrenade_Stone","Flashbang",1700],  

                    ["optic_Arco",nil,2500],  

                    ["optic_SOS",nil,7500]  

                ]  

            ];  

        };  

    };  

};  

  

case "rebel":  

{  

    switch(true) do  

    {  

        case (playerSide != civilian): {"Vous n'êtes pas Civil!"};  

        case (!license_civ_rebel): {"Vous ne faites pas parti du Pacte Rebelle!"};  

        default  

        {  

            ["Boutique de Mohammed's le Rebelle",  

                [  

                    ["arifle_SDAR_F",nil,20000],  

                    ["20Rnd_556x45_UW_mag",nil,200],  

                    ["arifle_TRG20_F",nil,25000],  

                    ["30Rnd_556x45_Stanag",nil,250],  

                    ["arifle_Katiba_F",nil,30000],  

                    ["10Rnd_762x51_Mag",nil,300],  

                    ["srifle_DMR_01_F",nil,50000],  

                    ["30Rnd_65x39_caseless_green",nil,350],  

                    ["srifle_EBR_F",nil,75000],  

                    ["20Rnd_762x51_Mag",nil,400],  

                    ["srifle_LRR_F",nil,100000],  

                    ["7Rnd_408_Mag"nil,450],  

                    ["launch_RPG32_F",nil,200000],  

                    ["RPG32_F",nil,20000],  

                    ["hgun_Rook40_F",nil,5000],  

                    ["30Rnd_9x21_Mag",nil,100],  

                    ["hgun_Pistol_heavy_02_F",nil,7500],  

                    ["6Rnd_45ACP_Cylinder",nil,150],  

                    ["hgun_Pistol_heavy_01_F",nil,9000],  

                    ["11Rnd_45ACP_Mag",nil,145],  

                    ["optic_Yorris","Viseur Zubr.45",1000],  

                    ["optic_MRD","Viseur 4-five.45",1000],  

                    ["acc_flashlight",nil,1000],  

                    ["optic_ACO_grn",nil,2500],  

                    ["optic_Holosight",nil,3000],  

                    ["optic_Hamr",nil,5000],  

                    ["optic_Arco",nil,5000],  

                    ["optic_SOS",nil,7500],  

                    ["muzzle_snds_acp",nil,750],  

                    ["muzzle_snds_L",nil,1000],  

                    ["muzzle_snds_M",nil,1250],  

                    ["muzzle_snds_H",nil,1500],  

                    ["muzzle_snds_B",nil,2000]  

                ]  

            ];  

        };  

    };  

};  

  

case "gun":  

{  

    switch(true) do  

    {  

        case (playerSide != civilian): {"Vous n'êtes pas Civil!"};  

        case (!license_civ_gun): {"Vous n'avez pas le Permis de Port d'Arme!"};  

        default  

        {  

            ["Boutique d'Arme à Feu",  

                [  

                    ["hgun_Rook40_F",nil,6500],  

                    ["30Rnd_9x21_Mag",nil,100]  

                    ["hgun_Pistol_heavy_02_F",nil,9850],  

                    ["6Rnd_45ACP_Cylinder",nil,150],  

                    ["hgun_ACPC2_F",nil,11500],  

                    ["9Rnd_45ACP_Mag",nil,145],  

                    ["hgun_PDW2000_F",nil,20000],  

                    ["30Rnd_9x21_Mag",nil,275]  

                    ["optic_ACO_grn_smg",nil,2500],  

                    ["V_Rangemaster_belt",nil,4900]  

                ]  

            ];  

        };  

    };  

};  

  

case "gang":  

{  

    switch(true) do  

    {  

        case (playerSide != civilian): {"Vous n'êtes pas Civil!"};  

        default  

        {  

            ["Armement de Planque",  

                [  

                    ["hgun_Rook40_F",nil,1500],  

                    ["16Rnd_9x21_Mag",nil,50],  

                    ["hgun_Pistol_heavy_02_F",nil,2500],  

                    ["6Rnd_45ACP_Cylinder",nil,100],  

                    ["hgun_ACPC2_F",nil,4500],  

                    ["9Rnd_45ACP_Mag",nil,95],  

                    ["hgun_PDW2000_F",nil,9500],  

                    ["30Rnd_9x21_Mag",nil,75]  

                    ["optic_ACO_grn_smg",nil,950],  

                    ["V_Rangemaster_belt",nil,1900]  

                ]  

            ];  

        };  

    };  

};  

  

case "genstore":  

{  

    ["Magasin Géneral d'Altis",  

        [  

            ["ItemGPS",nil,100],  

            ["Binocular",nil,150],  

            ["FirstAidKit",nil,150],  

            ["ToolKit",nil,250],  

            ["Chemlight_red",nil,300],  

            ["Chemlight_yellow",nil,300],  

            ["Chemlight_green",nil,300],  

            ["Chemlight_blue",nil,300],  

            ["NVGoggles",nil,2000]  

        ]  

    ];  

};  

};

Merci d’avance de votre aide


#2
            ["Boutique d'Arme à Feu",  
                [  
                    ["hgun_Rook40_F",nil,6500],  
                    ["30Rnd_9x21_Mag",nil,100]  
                    ["hgun_Pistol_heavy_02_F",nil,9850],  
                    ["6Rnd_45ACP_Cylinder",nil,150],  
                    ["hgun_ACPC2_F",nil,11500],  
                    ["9Rnd_45ACP_Mag",nil,145],  
                    ["hgun_PDW2000_F",nil,20000],  
                    ["30Rnd_9x21_Mag",nil,275], <<<<</ ta oublier une virgule ici  
                    ["optic_ACO_grn_smg",nil,2500],  
                    ["V_Rangemaster_belt",nil,4900]

                               ["Armement de Planque",

                [  
                    ["hgun_Rook40_F",nil,1500],  
                    ["16Rnd_9x21_Mag",nil,50],  
                    ["hgun_Pistol_heavy_02_F",nil,2500],  
                    ["6Rnd_45ACP_Cylinder",nil,100],  
                    ["hgun_ACPC2_F",nil,4500],  
                    ["9Rnd_45ACP_Mag",nil,95],  
                    ["hgun_PDW2000_F",nil,9500],  
                    ["30Rnd_9x21_Mag",nil,75], <<<<</ici aussi  
                    ["optic_ACO_grn_smg",nil,950],  
                    ["V_Rangemaster_belt",nil,1900]  
                ]

voila :stuck_out_tongue:


#3

Déjà :

 ["Boutique d'Arme à Feu",  
                    [  
                        ["hgun_Rook40_F",nil,6500],  
                        ["30Rnd_9x21_Mag",nil,100]  
                        ["hgun_Pistol_heavy_02_F",nil,9850],  
                        ["6Rnd_45ACP_Cylinder",nil,150],  
                        ["hgun_ACPC2_F",nil,11500],  
                        ["9Rnd_45ACP_Mag",nil,145],  
                        ["hgun_PDW2000_F",nil,20000],  
                        ["30Rnd_9x21_Mag",nil,275]     // Ligne ou tu as oublié une virgule.  
                        ["optic_ACO_grn_smg",nil,2500],  
                        ["V_Rangemaster_belt",nil,4900]  

et là

  ["Armement de Planque",  
                    [  
                        ["hgun_Rook40_F",nil,1500],  
                        ["16Rnd_9x21_Mag",nil,50],  
                        ["hgun_Pistol_heavy_02_F",nil,2500],  
                        ["6Rnd_45ACP_Cylinder",nil,100],  
                        ["hgun_ACPC2_F",nil,4500],  
                        ["9Rnd_45ACP_Mag",nil,95],  
                        ["hgun_PDW2000_F",nil,9500],  
                        ["30Rnd_9x21_Mag",nil,75]  // Oublie de virgule encore.  
                        ["optic_ACO_grn_smg",nil,950],  
                        ["V_Rangemaster_belt",nil,1900]  

#4

Déjà :

 ["Boutique d'Arme à Feu",  
                    [  
                        ["hgun_Rook40_F",nil,6500],  
                        ["30Rnd_9x21_Mag",nil,100]  
                        ["hgun_Pistol_heavy_02_F",nil,9850],  
                        ["6Rnd_45ACP_Cylinder",nil,150],  
                        ["hgun_ACPC2_F",nil,11500],  
                        ["9Rnd_45ACP_Mag",nil,145],  
                        ["hgun_PDW2000_F",nil,20000],  
                        ["30Rnd_9x21_Mag",nil,275]     // Ligne ou tu as oublié une virgule.  
                        ["optic_ACO_grn_smg",nil,2500],  
                        ["V_Rangemaster_belt",nil,4900]  

et là

  ["Armement de Planque",  
                    [  
                        ["hgun_Rook40_F",nil,1500],  
                        ["16Rnd_9x21_Mag",nil,50],  
                        ["hgun_Pistol_heavy_02_F",nil,2500],  
                        ["6Rnd_45ACP_Cylinder",nil,100],  
                        ["hgun_ACPC2_F",nil,4500],  
                        ["9Rnd_45ACP_Mag",nil,95],  
                        ["hgun_PDW2000_F",nil,9500],  
                        ["30Rnd_9x21_Mag",nil,75]  // Oublie de virgule encore.  
                        ["optic_ACO_grn_smg",nil,950],  
                        ["V_Rangemaster_belt",nil,1900]  

voleur :frowning:


#5

merci je vais test


#6

ZeWills tu as été plus rapide, mais t’as pas mis les balises de codes et t’as pas expliqué :smiley: :stuck_out_tongue:


#7

Probleme toujours present voici le fichier avec les virgules


#include <macro.h>  
/*  
    File: fn_weaponShopCfg.sqf  
    Author: Bryan "Tonic" Boardwine  

    Description:  
    Master configuration file for the weapon shops.  

    Return:  
    String: Close the menu  
    Array:  
    [Shop Name,  
    [ //Array of items to add to the store  
        [classname,Custom Name (set nil for default),price]  
    ]]  
*/  
private["_shop"];  
_shop = [_this,0,"",[""]] call BIS_fnc_param;  
if(_shop == "") exitWith {closeDialog 0}; //Bad shop type passed.  

switch(_shop) do  
{  
    case "cop_basic":  
    {  
        switch(true) do  
        {  
            case (playerSide != west): {"Vous n'êtes pas Policier!"};  
            default  
            {  
                ["Boutique de Police d'Altis",  
                    [  
                        ["hgun_P07_snds_F","Stun Pistol",2000],  
                        ["hgun_P07_F",nil,7500],  
                        ["muzzle_snds_L",nil,650],  
                        ["16Rnd_9x21_Mag",nil,100],  
                        ["arifle_sdar_F","Taser Rifle",20000],  
                        ["20Rnd_556x45_UW_mag","Taser Rifle Magazine",125],  
                        ["HandGrenade_Stone","Flashbang",1700],  
                        ["ItemGPS",nil,100],  
                        ["FirstAidKit",nil,150],  
                        ["Binocular",nil,150],  
                        ["ToolKit",nil,250],  
                        ["Medikit",nil,1000],  
                        ["NVGoggles",nil,2000]  
                    ]  
                ];  
            };  
        };  
    };  

    case "med_basic":  
    {  
        switch (true) do  
        {  
            case (playerSide != independent): {"Vous n'êtes Pas du SAMU"};  
            default {  
                ["Boutique du SAMU",  
                    [  
                        ["ItemGPS",nil,100],  
                        ["Binocular",nil,150],  
                        ["FirstAidKit",nil,150],  
                        ["ToolKit",nil,250],  
                        ["Medikit",nil,500],  
                        ["NVGoggles",nil,1200],  
                        ["B_FieldPack_ocamo",nil,3000]  
                    ]  
                ];  
            };  
        };  
    };  

    case "cop_patrol":  
    {  
        switch(true) do  
        {  
            case (playerSide != west): {"Vous n'êtes pas Policier!"};  
            case (__GETC__(life_coplevel) < 2): {"Vous n'avez pas le Rang d'Officier de Patrouille!"};  
            default  
            {  
                ["Boutique d'Officier de Patrouille d'Altis",  
                    [  
                        ["SMG_02_ACO_F",nil,30000],  
                        ["30Rnd_9x21_Mag",nil,250],  
                        ["arifle_MX_F",nil,35000],  
                        ["muzzle_snds_H",nil,2750],  
                        ["30Rnd_65x39_caseless_mag",nil,300],  
                        ["HandGrenade_Stone","Flashbang",1700],  
                        ["MineDetector",nil,1000],  
                        ["acc_flashlight",nil,750],  
                        ["optic_Holosight",nil,1200],  
                        ["optic_Arco",nil,2500]  
                    ]  
                ];  
            };  
        };  
    };  

    case "cop_sergeant":  
    {  
        switch(true) do  
        {  
            case (playerSide != west): {"Vous n'êtes pas Policier!"};  
            case (__GETC__(life_coplevel) < 3): {"Vous n'avez pas le Rang de Sergent!"};  
            default  
            {  
                ["Boutique des Sergents d'Altis",  
                    [  
                        ["SMG_02_ACO_F",nil,15000],  
                        ["30Rnd_9x21_Mag",nil,160],  
                        ["hgun_ACPC2_F",nil,17500],  
                        ["9Rnd_45ACP_Mag",nil,200],  
                        ["arifle_MXC_F",nil,30000],  
                        ["muzzle_snds_H",nil,2750],  
                        ["30Rnd_65x39_caseless_mag",nil,200],  
                        ["srifle_LRR_F",nil,50000],  
                        ["7Rnd_408_Mag"nil,450],  
                        ["HandGrenade_Stone","Flashbang",1700],  
                        ["optic_Arco",nil,2500],  
                        ["optic_SOS",nil,7500]  
                    ]  
                ];  
            };  
        };  
    };  

    case "rebel":  
    {  
        switch(true) do  
        {  
            case (playerSide != civilian): {"Vous n'êtes pas Civil!"};  
            case (!license_civ_rebel): {"Vous ne faites pas parti du Pacte Rebelle!"};  
            default  
            {  
                ["Boutique de Mohammed's le Rebelle",  
                    [  
                        ["arifle_SDAR_F",nil,20000],  
                        ["20Rnd_556x45_UW_mag",nil,200],  
                        ["arifle_TRG20_F",nil,25000],  
                        ["30Rnd_556x45_Stanag",nil,250],  
                        ["arifle_Katiba_F",nil,30000],  
                        ["10Rnd_762x51_Mag",nil,300],  
                        ["srifle_DMR_01_F",nil,50000],  
                        ["30Rnd_65x39_caseless_green",nil,350],  
                        ["srifle_EBR_F",nil,75000],  
                        ["20Rnd_762x51_Mag",nil,400],  
                        ["srifle_LRR_F",nil,100000],  
                        ["7Rnd_408_Mag"nil,450],  
                        ["launch_RPG32_F",nil,200000],  
                        ["RPG32_F",nil,20000],  
                        ["hgun_Rook40_F",nil,5000],  
                        ["30Rnd_9x21_Mag",nil,100],  
                        ["hgun_Pistol_heavy_02_F",nil,7500],  
                        ["6Rnd_45ACP_Cylinder",nil,150],  
                        ["hgun_Pistol_heavy_01_F",nil,9000],  
                        ["11Rnd_45ACP_Mag",nil,145],  
                        ["optic_Yorris","Viseur Zubr.45",1000],  
                        ["optic_MRD","Viseur 4-five.45",1000],  
                        ["acc_flashlight",nil,1000],  
                        ["optic_ACO_grn",nil,2500],  
                        ["optic_Holosight",nil,3000],  
                        ["optic_Hamr",nil,5000],  
                        ["optic_Arco",nil,5000],  
                        ["optic_SOS",nil,7500],  
                        ["muzzle_snds_acp",nil,750],  
                        ["muzzle_snds_L",nil,1000],  
                        ["muzzle_snds_M",nil,1250],  
                        ["muzzle_snds_H",nil,1500],  
                        ["muzzle_snds_B",nil,2000]  
                    ]  
                ];  
            };  
        };  
    };  

    case "gun":  
    {  
        switch(true) do  
        {  
            case (playerSide != civilian): {"Vous n'êtes pas Civil!"};  
            case (!license_civ_gun): {"Vous n'avez pas le Permis de Port d'Arme!"};  
            default  
            {  
                ["Boutique d'Arme à Feu",  
                    [  
                        ["hgun_Rook40_F",nil,6500],  
                        ["30Rnd_9x21_Mag",nil,100],  
                        ["hgun_Pistol_heavy_02_F",nil,9850],  
                        ["6Rnd_45ACP_Cylinder",nil,150],  
                        ["hgun_ACPC2_F",nil,11500],  
                        ["9Rnd_45ACP_Mag",nil,145],  
                        ["hgun_PDW2000_F",nil,20000],  
                        ["30Rnd_9x21_Mag",nil,275],  
                        ["optic_ACO_grn_smg",nil,2500],  
                        ["V_Rangemaster_belt",nil,4900]  
                    ]  
                ];  
            };  
        };  
    };  

    case "gang":  
    {  
        switch(true) do  
        {  
            case (playerSide != civilian): {"Vous n'êtes pas Civil!"};  
            default  
            {  
                ["Armement de Planque",  
                    [  
                        ["hgun_Rook40_F",nil,1500],  
                        ["16Rnd_9x21_Mag",nil,50],  
                        ["hgun_Pistol_heavy_02_F",nil,2500],  
                        ["6Rnd_45ACP_Cylinder",nil,100],  
                        ["hgun_ACPC2_F",nil,4500],  
                        ["9Rnd_45ACP_Mag",nil,95],  
                        ["hgun_PDW2000_F",nil,9500],  
                        ["30Rnd_9x21_Mag",nil,75],  
                        ["optic_ACO_grn_smg",nil,950],  
                        ["V_Rangemaster_belt",nil,1900]  
                    ]  
                ];  
            };  
        };  
    };  

    case "genstore":  
    {  
        ["Magasin Géneral d'Altis",  
            [  
                ["ItemGPS",nil,100],  
                ["Binocular",nil,150],  
                ["FirstAidKit",nil,150],  
                ["ToolKit",nil,250],  
                ["Chemlight_red",nil,300],  
                ["Chemlight_yellow",nil,300],  
                ["Chemlight_green",nil,300],  
                ["Chemlight_blue",nil,300],  
                ["NVGoggles",nil,2000]  
            ]  
        ];  
    };  
};  

:frowning:


#8

probeme resolu par moi meme il faux pas modifier le ficher avec notepad mais avec wordpad car le fichier ne devient pas stable sinon


#9

probeme resolu par moi meme il faux pas modifier le ficher avec notepad mais avec wordpad car le fichier ne devient pas stable sinon

:blink:

Sinon voici ton problème :

 case "cop_sergeant":  
    {  
        switch(true) do  
        {  
            case (playerSide != west): {"Vous n'êtes pas Policier!"};  
            case (__GETC__(life_coplevel) < 3): {"Vous n'avez pas le Rang de Sergent!"};  
            default  
            {  
                ["Boutique des Sergents d'Altis",  
                    [  
                        ["SMG_02_ACO_F",nil,15000],  
                        ["30Rnd_9x21_Mag",nil,160],  
                        ["hgun_ACPC2_F",nil,17500],  
                        ["9Rnd_45ACP_Mag",nil,200],  
                        ["arifle_MXC_F",nil,30000],  
                        ["muzzle_snds_H",nil,2750],  
                        ["30Rnd_65x39_caseless_mag",nil,200],  
                        ["srifle_LRR_F",nil,50000],  
                        ["7Rnd_408_Mag"nil,450], //Oublie pas la virgule après Mag  
                        ["HandGrenade_Stone","Flashbang",1700],  
                        ["optic_Arco",nil,2500],  
                        ["optic_SOS",nil,7500]  
                    ]  
                ];  
            };  
        };  
    };  

#10

probeme resolu par moi meme il faux pas modifier le ficher avec notepad mais avec wordpad car le fichier ne devient pas stable si

C’est impossible puisqu’il sont créer à partir de notepad^^ et notepad est un logiciel éditeur de code, sur un wordpad, c’est un éditeur de texte.


#11

Utilisez Notepad ++ il aide à l’alignement des parentèses et crochets