Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

AutoUpdate example for everyone


  • Please log in to reply
28 replies to this topic

#21
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

Don't get the reason  :huh:

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


  • 0

#22
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

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

  • 0

#23
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

it's your typo. pls change PrintChat("Downloaded "..i[1]..l) not i[i] :spurdo:

Spoiler

Edited: just tested and worked fine


  • 0

#24
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts


it's your typo. pls change PrintChat("Downloaded "..i[1]..l) not i[i] :spurdo:

Spoiler

Edited: just tested and worked fine

 

Nah it was the bad usage of the function in async xD

It worked after I re added the function () end 


  • 0

#25
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

Nah it was the bad usage of the function in async xD
It worked after I re added the function () end


i told you lol, your printchat had problems, so just add function() end instead
  • 0

#26
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

i told you lol, your printchat had problems, so just add function() end instead

 

So PrintChat in that func broke it? Why did that happen :huh:


  • 0

#27
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

So PrintChat in that func broke it? Why did that happen :huh:


cuz of i[i] i would say.
  • 0

#28
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts


cuz of i[i] i would say.

 

ah lol... FML


  • 0

#29
Icesythe7

Icesythe7

    Forum Manager

  • Contributor
  • 181 posts

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users