L-I-V / MQL-Tools

49 stars 17 forks source link

MQL: Create configuration error #4

Closed mscengsoft closed 1 year ago

mscengsoft commented 1 year ago

Hello,

While following the instructions on "Quick Setup Guide:", I get an error on step 3: Create a settings file "settings.json". Press Ctrl+Shift+P to open the command palette, select "MQL: Create configuration".

When I run "MQL: Create configuration" I get an error message: "Command 'MQL: Configuration' resulted in an error (Cannot read properties of undefined (reading '0'))

Could you please help me figure this out? I would love to install this extension.

Thank you,

Marcelo.

L-I-V commented 1 year ago

I have not encountered such an error, but I will keep it in mind for the future. Create the 'settings.json' file manually as shown in the picture Settings and copy this code into it

{
    "C_Cpp.default.includePath": [
        "${workspaceFolder}/**",
        "C:\\Users\\<your name>\\AppData\\Roaming\\MetaQuotes\\Terminal\\D2E7219F73C8BF37CD8BF550E55FF075\\MQL5\\Include"
    ],
    "C_Cpp.errorSquiggles": "Disabled",
    "mql_tools.context": true,
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "token.error.mql",
                "settings": {
                    "foreground": "#F44747"
                }
            },
            {
                "scope": "token.done.mql",
                "settings": {
                    "foreground": "#029c23d3"
                }
            },
            {
                "scope": "token.warning.mql",
                "settings": {
                    "foreground": "#ff9d00"
                }
            },
            {
                "scope": "token.info.mql",
                "settings": {
                    "foreground": "#0861fc"
                }
            },
            {
                "scope": "token.heading.mql",
                "settings": {
                    "foreground": "#6796E6"
                }
            }
        ]
    },
    "files.exclude": {
        "**/*.ex4": true,
        "**/*.ex5": true
    },
    "files.associations": {
        "*.mqh": "cpp",
        "*.mq4": "cpp",
        "*.mq5": "cpp"
    }
}

then change this path to your own: "C:\\Users\\<your name>\\AppData\\Roaming\\MetaQuotes\\Terminal\\D2E7219F73C8BF37CD8BF550E55FF075\\MQL5\\Include".