[{"data":1,"prerenderedAt":334},["ShallowReactive",2],{"/docs/guide/editing-configs":3,"/docs/guide/editing-configs-surround":321},{"id":4,"title":5,"body":6,"description":310,"extension":311,"head":312,"meta":313,"navigation":314,"path":316,"schemaOrg":312,"seo":317,"sitemap":318,"stem":319,"__hash__":320},"docs/1.docs/1.guide/2.editing-configs.md","Editing Configs",{"type":7,"value":8,"toc":301},"minimark",[9,18,23,26,29,39,42,46,85,89,96,99,133,143,147,150,205,212,216,219,225,228,232,235,241,252,256,259,265,278,281,288,291,297],[10,11,12,13,17],"p",{},"Most Sky-Systems customization happens in ",[14,15,16],"code",{},"config/*.lua"," files. These files are Lua files, so small syntax mistakes can stop the resource from starting.",[19,20,22],"h2",{"id":21},"before-editing","Before Editing",[10,24,25],{},"Make a backup before every larger change.",[10,27,28],{},"Good examples:",[30,31,37],"pre",{"className":32,"code":34,"language":35,"meta":36},[33],"language-text","config.lua\nconfig.backup-before-garage-change.lua\n","text","",[14,38,34],{"__ignoreMap":36},[10,40,41],{},"Only change one topic at a time. If you edit jobs, items, webhooks, permissions, and garage vehicles all at once, it becomes much harder to find the mistake.",[19,43,45],{"id":44},"lua-config-basics","Lua Config Basics",[47,48,49,56,66,72,79],"ul",{},[50,51,52,53],"li",{},"Text uses quotes: ",[14,54,55],{},"Config.Locale = \"en\"",[50,57,58,59,62,63],{},"On/off values use ",[14,60,61],{},"true"," or ",[14,64,65],{},"false",[50,67,68,69],{},"Numbers usually do not use quotes: ",[14,70,71],{},"Config.Price = 500",[50,73,74,75,78],{},"Lists and grouped settings use ",[14,76,77],{},"{}"," and commas",[50,80,81,82],{},"Backticks are often used for FiveM hashes: ",[14,83,84],{},"vehicle = `ambulance` ",[19,86,88],{"id":87},"use-real-resource-names","Use Real Resource Names",[10,90,91,92,95],{},"When a config asks for a resource name, use the folder name from your ",[14,93,94],{},"resources"," folder.",[10,97,98],{},"Example:",[30,100,104],{"className":101,"code":102,"language":103,"meta":36,"style":36},"language-lua shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Config.Inventory = \"ox_inventory\"\n","lua",[14,105,106],{"__ignoreMap":36},[107,108,111,115,119,123,126,130],"span",{"class":109,"line":110},"line",1,[107,112,114],{"class":113},"sTEyZ","Config.",[107,116,118],{"class":117},"sBMFI","Inventory",[107,120,122],{"class":121},"sMK4o"," =",[107,124,125],{"class":121}," \"",[107,127,129],{"class":128},"sfazB","ox_inventory",[107,131,132],{"class":121},"\"\n",[10,134,135,136,62,139,142],{},"Do not guess names like ",[14,137,138],{},"ox",[14,140,141],{},"inventory"," unless that is the real resource folder name.",[19,144,146],{"id":145},"change-values-not-keys","Change Values, Not Keys",[10,148,149],{},"In many configs, the left side is a key used by the script.",[30,151,153],{"className":101,"code":152,"language":103,"meta":36,"style":36},"Config.CommandPermissions = {\n    revive = {\n        \"group.admin\",\n    },\n}\n",[14,154,155,167,178,193,199],{"__ignoreMap":36},[107,156,157,159,162,164],{"class":109,"line":110},[107,158,114],{"class":113},[107,160,161],{"class":117},"CommandPermissions",[107,163,122],{"class":121},[107,165,166],{"class":113}," {\n",[107,168,170,173,176],{"class":109,"line":169},2,[107,171,172],{"class":113},"    revive ",[107,174,175],{"class":121},"=",[107,177,166],{"class":113},[107,179,181,184,187,190],{"class":109,"line":180},3,[107,182,183],{"class":121},"        \"",[107,185,186],{"class":128},"group.admin",[107,188,189],{"class":121},"\"",[107,191,192],{"class":113},",\n",[107,194,196],{"class":109,"line":195},4,[107,197,198],{"class":113},"    },\n",[107,200,202],{"class":109,"line":201},5,[107,203,204],{"class":113},"}\n",[10,206,207,208,211],{},"In this example, ",[14,209,210],{},"revive"," is not just display text. Renaming it can break the permission for that command.",[19,213,215],{"id":214},"restart-after-changes","Restart After Changes",[10,217,218],{},"After editing a config, restart the resource:",[30,220,223],{"className":221,"code":222,"language":35,"meta":36},[33],"restart sky_ambulancejob\n",[14,224,222],{"__ignoreMap":36},[10,226,227],{},"Some changes require a full server restart, especially SQL changes, framework bridge changes, or dependency changes.",[19,229,231],{"id":230},"read-the-console","Read The Console",[10,233,234],{},"If the resource does not start, check the server console. Lua syntax errors usually show a file and line number:",[30,236,239],{"className":237,"code":238,"language":35,"meta":36},[33],"SCRIPT ERROR: @sky_ambulancejob/config/config.lua:120: '}' expected near 'name'\n",[14,240,238],{"__ignoreMap":36},[10,242,243,244,247,248,251],{},"That means the mistake is around line ",[14,245,246],{},"120"," in ",[14,249,250],{},"config/config.lua",".",[19,253,255],{"id":254},"follow-up-errors-after-a-broken-config","Follow-Up Errors After A Broken Config",[10,257,258],{},"Sometimes the console shows many errors that look unrelated:",[30,260,263],{"className":261,"code":262,"language":35,"meta":36},[33],"SCRIPT ERROR: @sky_mechanicjob/config/locales/de.lua:1024: attempt to index a nil value (global 'Locales')\nSCRIPT ERROR: @sky_mechanicjob/config/locales/en.lua:1033: attempt to index a nil value (global 'Locales')\nSCRIPT ERROR: bad argument #1 to 'for iterator' (table expected, got nil)\nSCRIPT ERROR: attempt to index a nil value (field 'ToggleFeatures')\n",[14,264,262],{"__ignoreMap":36},[10,266,267,268,271,272,62,275,251],{},"This often means the main config did not load correctly. A missing comma, broken bracket, wrong quote, or deleted config section can stop ",[14,269,270],{},"config.lua"," before it creates required tables like ",[14,273,274],{},"Config.ToggleFeatures",[14,276,277],{},"Locales",[10,279,280],{},"When you see errors like this, do not only fix the last error in the console. Scroll up and find the first error from that resource after restart. The first error usually points to the real config mistake.",[10,282,283,284,287],{},"Common causes are missing commas, missing ",[14,285,286],{},"}",", broken quotes, deleted config sections, or copying only part of a new config after an update.",[10,289,290],{},"Quick check:",[30,292,295],{"className":293,"code":294,"language":35,"meta":36},[33],"1. Restart the resource.\n2. Scroll to the first error for that resource.\n3. Open the file and line shown in the first error.\n4. Compare the edited config with a fresh original config.\n5. Fix the syntax or restore the missing section.\n",[14,296,294],{"__ignoreMap":36},[298,299,300],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":110,"depth":169,"links":302},[303,304,305,306,307,308,309],{"id":21,"depth":169,"text":22},{"id":44,"depth":169,"text":45},{"id":87,"depth":169,"text":88},{"id":145,"depth":169,"text":146},{"id":214,"depth":169,"text":215},{"id":230,"depth":169,"text":231},{"id":254,"depth":169,"text":255},"Learn how to safely edit Lua config files without breaking your FiveM server.","md",null,{},{"icon":315},"i-lucide-sliders-horizontal","/docs/guide/editing-configs",{"title":5,"description":310},{"loc":316},"1.docs/1.guide/2.editing-configs","FtrceRr6PWHuZC_FzbbOJG3zz4ERHQ4FbP1Ek1SjyBM",[322,328],{"title":323,"path":324,"stem":325,"description":326,"icon":327,"children":-1},"Beginner Guide","/docs/guide/beginner-guide","1.docs/1.guide/1.beginner-guide","A practical first-read guide for new FiveM server owners using Sky-Systems resources.","i-lucide-sparkles",{"title":329,"path":330,"stem":331,"description":332,"icon":333,"children":-1},"FiveM Basics","/docs/guide/fivem-basics","1.docs/1.guide/3.fivem-basics","Basic FiveM concepts that help you install, configure, and debug resources.","i-lucide-server",1780173463850]