Zwei, on 14 Apr 2016 - 5:30 PM, said:
Don't get the reason
Because I thought lua will auto set the elements in the table...
Tested:
Didn't change stuff :/
Actually, we have to give index for all members in a table
Shortened code still errors but downloads
local sf = { {[1] = "Dlc_glados_killing_spree_ann_glados_kill_double_",[2] = 1}, {[1] = "Dlc_glados_killing_spree_ann_glados_kill_triple_",[2] = 1}, {[1] = "Dlc_glados_killing_spree_ann_glados_kill_ultra_",[2] = 2}, {[1] = "Dlc_glados_killing_spree_ann_glados_kill_rampage_",[2] = 3}, {[1] = "Dlc_glados_ann_glados_followup_respaw_",[2] = 13}, {[1] = "Dlc_glados_ann_glados_ally_neg_",[2] = 26}, } if not DirExists(SOUNDS_PATH..[[\Glados\]]) then CreateDir(SOUNDS_PATH..[[\Glados\]]) end for _,i in pairs(sf) do for l=1,i[2] do print(i[1]..i[2]) if not FileExist(SOUNDS_PATH.. [[\Glados\]] .. i[1] .. l .. ".wav") then DownloadFileAsync("https://raw.githubusercontent.com/LoggeL/GoS/master/GS/" .. i[1]..l..".wav" ,SOUNDS_PATH .. [[\Glados\]] .. i[1]..l..".wav") else print("exists") end end end
it's your typo. pls change PrintChat("Downloaded "..i[1]..l) not i[i]
Edited: just tested and worked fine
why not just zip all the sound files then download the entire zipped folder and just unzip it on users pc so you don't have to do all that crap
0 members, 0 guests, 0 anonymous users