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: Broken with no error?

Previous Thread :: Next Thread 
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
12 Jan 2016 05:52 PM
local bandata = game:GetService("DataStoreService"):GetDataStore("BanData2")
local list = script.Parent:WaitForChild("Main"):WaitForChild("list")
list:ClearAllChildren()
local gobj = script:WaitForChild("pers")

local horz = 3
local num = 0

while true do
for i=1,999999999 do
pcall(function()
local dat = bandata:GetAsync(i) or {}
local chances = dat.chances or 0
if chances > 3 then
num = num + 1
local nobj = gobj:clone()
nobj.Size = UDim2.new(1/horz, 0, 0, 40)
nobj.Position = UDim2.new(1/horz * (num - (math.floor((num - 1) / horz) * horz) - 1), 0, 0, math.floor((num - 1) / horz) * 30)
nobj.Parent = list
end
end)
end
wait(10)
list:ClearAllChildren()
end

I don't see a problem, someone help

There is no error, and before you say "omg its teh waitforchild", everything with the waitforchild part exists
Report Abuse
EgoInclined is not online. EgoInclined
Joined: 11 Sep 2015
Total Posts: 98
12 Jan 2016 05:54 PM
Maybe the if statement condition doesn't return true.
Report Abuse
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
12 Jan 2016 05:59 PM
i don't know how it could be, i have a different script that actually changes the "chances" value, and when it does "if chances > 3 then", it returns true
Report Abuse
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
12 Jan 2016 06:28 PM
b1
Report Abuse
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
13 Jan 2016 03:39 PM
b2
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
13 Jan 2016 03:46 PM
"There is no error"
There easily could be an error that you have suppressed by using pcall.

Remove pcall to see what the error is:

while true do
for i=1,999999999 do
local dat = bandata:GetAsync(i) or {}
local chances = dat.chances or 0
if chances > 3 then
num = num + 1
local nobj = gobj:clone()
nobj.Size = UDim2.new(1/horz, 0, 0, 40)
nobj.Position = UDim2.new(1/horz * (num - (math.floor((num - 1) / horz) * horz) - 1), 0, 0, math.floor((num - 1) / horz) * 30)
nobj.Parent = list
end
end
wait(10)
list:ClearAllChildren()
end


Or print the pcall:

while true do
for i=1,999999999 do
print(pcall(function()
local dat = bandata:GetAsync(i) or {}
local chances = dat.chances or 0
if chances > 3 then
num = num + 1
local nobj = gobj:clone()
nobj.Size = UDim2.new(1/horz, 0, 0, 40)
nobj.Position = UDim2.new(1/horz * (num - (math.floor((num - 1) / horz) * horz) - 1), 0, 0, math.floor((num - 1) / horz) * 30)
nobj.Parent = list
end
end))
end
wait(10)
list:ClearAllChildren()
end


Report Abuse
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
13 Jan 2016 03:48 PM
ok ill try that
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
13 Jan 2016 03:50 PM
a forloop with for 999999999 loops is going to crash the server and break your datastore limit on getasync


Report Abuse
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
13 Jan 2016 03:51 PM
both ways did absolutely nothing
Report Abuse
TheGreenDeveloper is not online. TheGreenDeveloper
Joined: 29 Dec 2013
Total Posts: 776
13 Jan 2016 03:55 PM
Its getting data, not saving data
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