#CW-CRAFTING - materials names

1 messages · Page 1 of 1 (latest)

onyx tundra
#

Hi guys,

I facing an issue... i have some items that have a "-" simbol in the middle of the name, i.e:** burger-cheese**

When i include it on config, it returns an error:
Error parsing script @cw-crafting/config.lua in resource cw-crafting: @cw-crafting/config.lua:74: '}' expected (to close '{' at line 73) near '='

I tried to use in different ways:

  •    materials = {
          "burger-cheese" = 1,    
      },
    

    materials = {
        'burger-cheese' = 1,    
    },

    materials = {
        "burger-cheese = 1",    
    },*

Anyone know any way to solve this?
(sorry about my english 🙂 )
Thanks 😉

somber yoke
#
materials = {
  ["burger-cheese"] = 1,
},

It needs brackets around it to indicate to lua that it is an index.

I would advise you to not use dashes in item names however. I think it can cause issues in some cases