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 » Scripters
Home Search
 

Re: Advanced scripters...

Previous Thread :: Next Thread 
IDKBlox is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
14 Feb 2015 03:36 AM
Callbacks cannot yield? please explain
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
14 Feb 2015 03:39 AM
so have you ever seen hoodwinked

he got a callback

the axe man
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
14 Feb 2015 03:39 AM
Script please

Are you using some kinda bindable or remote, event or function
Report Abuse
drager980 is online. drager980
Joined: 25 May 2009
Total Posts: 13385
14 Feb 2015 03:40 AM
hoodwinked was a good movie
Report Abuse
IDKBlox is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
14 Feb 2015 03:43 AM
128

for i,v in pairs (p.Extras:GetChildren()) do
local connection = DataStore:OnUpdate(v.Name, function(value)
print(v.Name.. " was changed to "..value)
DataStore:SetAsync(v.Name, v.Value)
end)
if DataStore:GetAsync(v.Name,v.Value)~=nil then
v.Value=DataStore:GetAsync(v.Name,v.Value)
print(v.Name," ",DataStore:GetAsync(v.Name,v.Value))
end
end
Report Abuse
Rocky28447 is online. Rocky28447
Joined: 11 Dec 2009
Total Posts: 2912
14 Feb 2015 03:45 AM
pauls bunion cream has the soothing formula
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
14 Feb 2015 03:47 AM
local connection = DataStore:OnUpdate(v.Name, function(value)
print(v.Name.. " was changed to "..value)
DataStore:SetAsync(v.Name, v.Value)
end)




onUpdate can not yeild (pause, wait) and SetAsync pauses shortly while saving
I'm pretty sure thats it



I don't know if this will work but it should

local connection = DataStore:OnUpdate(v.Name, function(value)
print(v.Name.. " was changed to "..value)
spawn(function() DataStore:SetAsync(v.Name, v.Value) end)
end)
Report Abuse
IDKBlox is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
14 Feb 2015 03:49 AM
alright, one more question. When i try this

for i,v in pairs (p.Extras:GetChildren()) do
v.Changed:connect(function(value)
print(v.Name.. " was changed to "..value)
DataStore:SetAsync(v.Name, v.Value)
end)
if DataStore:GetAsync(v.Name,v.Value)~=nil and DataStore:GetAsync(v.Name,v.Value)>=0 then
v.Value=DataStore:GetAsync(v.Name,v.Value)
print(v.Name," ",DataStore:GetAsync(v.Name,v.Value))
end
end

i get this in the output after about 25 saves? anyone know why?

request limit exceeded on set
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
14 Feb 2015 03:52 AM
Remove any part that has to do with the data store (Comment out any Get and Set Async) and see how many times it prints
Report Abuse
IDKBlox is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
14 Feb 2015 03:54 AM
umm okay
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
14 Feb 2015 03:55 AM
Because depending on how often those values change its gonna save, a lot
Report Abuse
IDKBlox is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
14 Feb 2015 04:04 AM
Thanks, i just decided to add a wait(30) and it seems to have work
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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