generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How can I make the script notice the update?

Previous Thread :: Next Thread 
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 01:28 AM
local v = script.Parent.version
while true do wait(30)
if script.Parent.pack.update.version.Value > v.Value then
wait(3)
print("updating")
script.Parent.pack.update.main.Disabled = false
else
wait(3)
print("Outdated, now removing!")
table.foreach(script.Parent.pack:GetChildren(), function(i,v) v:Remove() end)
end end

-----------------------------

This has really stumped me..

It's most likely be a obvious answer,

It updates just fine, but when its done updating (and goes to "Outdated, now removing!") it keeps at it and does not find the update

It works by seeing if the new version is higher then the current one, then updates and sets the original version to the new version (The problem isnt here)

Sorry for messy scripting, i'm very not organized.

The script that inserts the update is 10 seconds earlier then this one, this is the script:

while true do wait(20) local m = game:service("InsertService"):LoadAsset(136391854) m.Parent = script.Parent.pack m.Name = "update" end

In the final product it wont be as often, but just for now since i'm testing.

Help please?

Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 01:58 AM
Bump

i'm batman
Report Abuse
meSmashsta is not online. meSmashsta
Joined: 31 Jan 2013
Total Posts: 1002
24 Nov 2013 02:05 AM
local v must be inside the loop or else when you remove it using the loop then that value is set to nil.
Report Abuse
meSmashsta is not online. meSmashsta
Joined: 31 Jan 2013
Total Posts: 1002
24 Nov 2013 02:09 AM
plus maybe if you explain more about the vars you used like table.forsearch, you'll get more help if you could explain us every variables you use and what it suppose to do.

even tho some are not advance in scripting, they might find logical error if get proper explanation.
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 02:12 AM
The local v solution is not working.

i'm batman
Report Abuse
dennis96411 is not online. dennis96411
Joined: 06 Mar 2009
Total Posts: 1079
24 Nov 2013 02:14 AM
Update v.Value with the new update version?
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 02:16 AM
@Dennis

Yes it does that already. It's not realizing there's a new update available. I updated the model with a new -higher- version and it's not working.

i'm batman
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 12:00 PM
bump

i'm batman
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 12:08 PM
Here's the update that the model is getting:

wait(1)
print("connection established")
msg = Instance.new("Hint", Workspace)
msg.Text = "PATCH v"..script.Parent.version.Value.." is now installing on this server! Lag may occur!"
game.Workspace.set:remove()
game.Workspace.patchservice.version.Value = script.Parent.version.Value
wait(3) print("done update") msg:Destroy()
script.Parent:remove()

i'm batman
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
24 Nov 2013 12:12 PM
script.Parent.pack.update.version.Changed:connect(function()
--Stuff
end)
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 12:13 PM
Ah! Thanks! Let's hope it works. :)

i'm batman
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 12:32 PM
I don't see how I can make it work with that method, is there any other methods.

i'm batman
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 01:10 PM
bump

i'm batman
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
24 Nov 2013 03:39 PM
c'mon

i'm batman
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
26 Nov 2013 05:56 PM
.

~ Make more Windows phones you scrubs! ~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image