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

#1
Icesythe7

Icesythe7

    Forum Manager

  • Contributor
  • 181 posts
local ver = "0.14"

function AutoUpdate(data)
    if tonumber(data) > tonumber(ver) then
        PrintChat("New version found! " .. data)
        PrintChat("Downloading update, please wait...")
        DownloadFileAsync("https://raw.githubusercontent.com/D3ftsu/GoS/master/ChallengerSeries.lua", SCRIPT_PATH .. "ChallengerSeries.lua", function() PrintChat("Update Complete, please 2x F6!") return end)
    else
        PrintChat("No updates found!")
    end
end

GetWebResultAsync("https://raw.githubusercontent.com/D3ftsu/GoS/master/ChallengerSeries.version", AutoUpdate)

Any questions ask here!


  • 4

#2
CptZeyx

CptZeyx

    Henry

  • Banned
  • PipPipPip
  • 784 posts
  • LocationBetween here and there

Nice tutorial, very easy to understand and I'd say very useful for those who are starting to write scripts.

 

:)


  • 0

#3
aizjg

aizjg

    GoS's Firefighter

  • Banned
  • PipPipPip
  • 325 posts
  • Locationfire dep 24/7 Kappa

noice for newbies like me :P


  • 0

#4
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts
why you share it to public bhim :grumpycat:
  • 0

#5
aizjg

aizjg

    GoS's Firefighter

  • Banned
  • PipPipPip
  • 325 posts
  • Locationfire dep 24/7 Kappa

why you share it to public bhim :grumpycat:

why wouldn't he


  • 0

#6
Deftsu

Deftsu

    donthackourgames

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

why wouldn't he


just messing with him :P
  • 0

#7
aizjg

aizjg

    GoS's Firefighter

  • Banned
  • PipPipPip
  • 325 posts
  • Locationfire dep 24/7 Kappa

just messing with him :P

hey he is using your code as an example, i would be happy ;)


  • 0

#8
Deftsu

Deftsu

    donthackourgames

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

hey he is using your code as an example, i would be happy ;)

 

that's not the code in my script btw xD


  • 0

#9
aizjg

aizjg

    GoS's Firefighter

  • Banned
  • PipPipPip
  • 325 posts
  • Locationfire dep 24/7 Kappa

that's not the code in my script btw xD

your script though :P


  • 0

#10
Mistejk

Mistejk

    Newbie

  • Members
  • 1 posts
It should work soon without bugsplatting if you F6 during the function being executed
  • 0

#11
Icesythe7

Icesythe7

    Forum Manager

  • Contributor
  • 181 posts

i like how ur first post is here lol


  • 1

#12
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

Sb a quick snippet for bulk download?

 

For table of files?

Cuz mine looks like this Kappa

 

1a68fcd1bad9957c014e87b2d5cad34c.jpg


  • 0

#13
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

Sb a quick snippet for bulk download?

 

For table of files?

Cuz mine looks like this Kappa

 

1a68fcd1bad9957c014e87b2d5cad34c.jpg

There's an error in your update func Keepo


  • 0

#14
Deftsu

Deftsu

    donthackourgames

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

Sb a quick snippet for bulk download?

For table of files?
Cuz mine looks like this Kappa

1a68fcd1bad9957c014e87b2d5cad34c.jpg


pleb :fappa: you did something wrong not because of table, try to debug it without using GetWebResult
  • 0

#15
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

pleb :fappa: you did something wrong not because of table, try to debug it without using GetWebResult

I don't even use it  :huh:

 

http://pastebin.com/2crhZjL5


  • 0

#16
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

I don't even use it  :huh:

 

http://pastebin.com/2crhZjL5

DirExists(SOUNDS_PATH..[[\Glados\]])

 

I think the correct is DirExists(SOUNDS_PATH.."\\Glados\\")


  • 0

#17
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

DirExists(SOUNDS_PATH..[[\Glados\]])

 

I think the correct is DirExists(SOUNDS_PATH.."\\Glados\\")

 

Mine works aswell Keepo

 

Edit: It also dl some (1-3) files but then it starts spamming errors.


  • 0

#18
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

Mine works aswell Keepo

 

Edit: It also dl some (1-3) files but then it starts spamming errors.

Because of this part

 

 {"Dlc_glados_killing_spree_ann_glados_kill_double_",1}

should be changed to   {[1] = "Dlc_glados_killing_spree_ann_glados_kill_double_",[2] = 1}


  • 0

#19
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

Because of this part

 

 {"Dlc_glados_killing_spree_ann_glados_kill_double_",1}

should be changed to   {[1] = "Dlc_glados_killing_spree_ann_glados_kill_double_",[2] = 1}

 

Don't get the reason  :huh:

Because I thought lua will auto set the elements in the table...

 

Tested:

Didn't change stuff :/


  • 0

#20
Zwei

Zwei

    Advanced Member

  • Contributor
  • 2,201 posts

With this code

Spoiler

 

it downlaods but still throws the error.

 

 

f11101ca47d5aca6f4f07b887c2e1699.gif


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users