This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FuuuAInfiniteLoop(F.A.I.L)'s profile picture

OS dont work, black screen and nothing happens(and sometimes an error that i cant see cause it clears too fast)

Started by FuuuAInfiniteLoop(F.A.I.L), 21 April 2013 - 12:36 AM
FuuuAInfiniteLoop(F.A.I.L) #1
Posted 21 April 2013 - 02:36 AM
The code is in github:

Please comment if you commit cause i dont check it regularly

https://github.com/urielsalis/UOS
I aisled the problem to the file called PartManager, but i dont find anything there
remiX #2
Posted 21 April 2013 - 03:55 AM
Maybe tell us more about what's supposed to happen…

PS:
table.size = function(tbl)
  local count = 0
  for _,__ in pairs(tbl) do
    count = count + 1
  end
  return count
end
?
just do #tableName
theoriginalbit #3
Posted 21 April 2013 - 04:03 AM
PS:
table.size = function(tbl)
  local count = 0
  for _,__ in pairs(tbl) do
	count = count + 1
  end
  return count
end
?
just do #tableName
Lol, that came from NeverCast's Top Coroutine Override thingy.

EDIT: Pretty much the first 143 lines are all NeverCast's…
Edited on 21 April 2013 - 02:07 AM
FuuuAInfiniteLoop(F.A.I.L) #4
Posted 21 April 2013 - 09:55 AM
Yes, i think that is the problem
Kingdaro #5
Posted 21 April 2013 - 09:59 AM
Maybe tell us more about what's supposed to happen…

PS:
table.size = function(tbl)
  local count = 0
  for _,__ in pairs(tbl) do
    count = count + 1
  end
  return count
end
?
just do #tableName

Using the "#" operator only counts numeric indices up until a nil value. His function makes it so that the length of this table


t = {
 [1] = 4,
 [2] = 2,
 [3] = 0,

 [5] = 3,
 foo = 'bar',
 spam = 'eggs'
}

would evaluate to 6, and not 3 with the regular old hash symbol.
FuuuAInfiniteLoop(F.A.I.L) #6
Posted 21 April 2013 - 12:15 PM
I deleted the first part and i detected that the problem is with the partition part that gives a too long without yelding error, so it its doing nothing while its on a loop(cause parallel then gives me that error)
FuuuAInfiniteLoop(F.A.I.L) #7
Posted 22 April 2013 - 02:12 PM
I edited the main post with the new code