You need to run refresh when you make changes to __resource.lua. The error you are hitting now is because LoadResourceFile returns the contents as a string, not a file handle. You want to do this instead.

if file then
    for line in file:gmatch("[^\r\n]+") do
     i = i + 1
     spawnskins[i] = line
    end
else
    error('file not found')
end