Error with an script

I got this issue and i dont know i tryed everything but im not enable to fix this sh*t

i Hope somebody help me with this

This is the error i get:

Error parsing script @fantastic_mechanic/config/config.lua in resource fantastic_mechanic: @fantastic_mechanic/config/config.lua:13: '}' expected (to close '{' at line 8) near '{'

This is the text:

Config = Config or {}

Config.ActionDistance = 8.0
Config.Keys = {
    action = {key = 38, label = 'E', name = 'INPUT_PICKUP'}
},

Config.Positions = {
    {
        pos = {x = -695.91, y = -789.26, z = 24.69},
        whitelistJobName = 'mechanic' 
    }
	{
        pos = {x = -700.91, y = -788.42, z = 24.69},
        whitelistJobName = 'mechanic' 
    }
	{
        pos = {x = -690.69, y = -788.85, z = 24.69},
        whitelistJobName = 'mechanic' 
    }
	{
        pos = {x = -695.91, y = -789.26, z = 24.69},
        whitelistJobName = 'mechanic' 
    }
	{
        pos = {x = -695.91, y = -789.26, z = 24.69},
        whitelistJobName = 'mechanic' 
    }
}

You have a syntax issue:

Config = Config or {}

Config.ActionDistance = 8.0
Config.Keys = {
    action = {key = 38, label = 'E', name = 'INPUT_PICKUP'}
} -- HERE IS YOUR ISSUE YOU DO NOT NEED A COMMA HERE!

Config.Positions = {
    {
        pos = {x = -695.91, y = -789.26, z = 24.69},
        whitelistJobName = 'mechanic' 
    }, -- YOU ARE HERE IN A OBJECT HERE YOU NEED A COMMA
	{
        pos = {x = -700.91, y = -788.42, z = 24.69},
        whitelistJobName = 'mechanic' 
    }, -- ALSO HERE
	{
        pos = {x = -690.69, y = -788.85, z = 24.69},
        whitelistJobName = 'mechanic' 
    }, -- AND HERE
	{
        pos = {x = -695.91, y = -789.26, z = 24.69},
        whitelistJobName = 'mechanic' 
    }, -- YES HERE
	{
        pos = {x = -695.91, y = -789.26, z = 24.69},
        whitelistJobName = 'mechanic' 
    } -- ALSO HERE? NO! BECAUSE ITS THE LAST ENTRY
}

Tell me when you have another issue buddy :slight_smile:

1 Like

Thank you very much. I gonna look later if it work. Thank you very very much.

1 Like

You´re welcome, mark this thread as completed (select a solution answer) when your problem is fixed now.

got a new error…

Im very sorry for the late reply!

Do you use my config I sent? I ask because your syntax error is in line 8 where I already correct the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.