Passing an array name to a function, then populating it
snippet in lua

Passing an array name to a function, then populating it

user9184

function readSaveFile(saveFile, arrayName)
  if love.filestystem.exists(saveFileName) then
    for k, v in pairs(love.filesystem.read(saveFileName)) do
      arrayName[k] = v
    end
  end
end