|
| 01 Dec 2011 06:10 PM |
Please help. I think the error is at around line 41 through 65...
NO OUTPUT ERROR
Workspace = Game:GetService("Workspace") Players = Game:GetService("Players")
msg = Instance.new("Message",Lighting)
playas = Players:GetPlayers()
MapParents = Game:GetService("Lighting") -- I'm assuming you parent your maps to Lighting... Change it if it isn't.
-- tables =3 Maps = {} survivers = {} dead = {} -- /tables =3 CurrentMap = nil
for _, Map in pairs(MapParents:GetChildren()) do table.insert(Maps, Map) end
UpdateMap = function() if type(CurrentMap) == "userdata" then CurrentMap.Parent = MapParents CurrentMap = nil end
msg.Parent = game.Workspace msg.Text = "Chosing a random map"
local NewMap = Maps[ math.random(1, #Maps) ] NewMap.Parent = Workspace
CurrentMap = NewMap msg.Text = "Map Chosen: "..NewMap.Name.."!" wait(4) msg.Parent = game.Lighting end
-- Printing survivors function, else, print "No survivors"... GetSurvivors = function() local String = "" if #survivers == 0 then msg.Parent = game.Workspace --return "No survivors" msg.Parent = game.Workspace msg.Text = "No survivors" wait(4) msg.Parent = game.Lighting end
for i, name in pairs(survivers) do --String = String .. "name" .. ", " String = ""..name..", " end String = String:sub(1, string.len(String) -1) --return String msg.Parent = game.Workspace msg.Text = ""..String.."" wait(4) msg.Parent = game.Lighting
end -- /Printing survivors function, else, print "No survivors"...
while not false do msg.Parent = Workspace msg.Text = "Take a break, 15 seconds before next round!" wait(2) msg.Parent = MapParent
playas = Players:GetPlayers() -- Updates it, incase new people join or people leave
for i = 1,#playas do playas[i].Character:MoveTo(Workspace.TeleSpawn.Position + (Vector3.new(5,0,0) * i)) end
for i = 15, 0, -1 do --Start, finish, increment wait(1) for k, v in pairs(game.Players:GetChildren()) do v.PlayerGui.CountdownGui.Frame.TextButton.Text = i end end
--wait(15)
msg.Parent = game.Workspace msg.Text = "Its game time!" wait(2) msg.Parent = game.Lighting
UpdateMap()
for i = 1,#playas do --playas[i].Character:MoveTo(CurrentMap.GameSpawn.Position + (Vector3.new(5,0,0) * i)) playas[i].Character.Humanoid.Health = 0 end
for i = 15, 0, -1 do --Start, finish, increment wait(1) for k, v in pairs(game.Players:GetChildren()) do v.PlayerGui.CountdownGui.Frame.TextButton.Text = i end end
-- Table inserting and removing and printing for i, player in pairs(Players:GetPlayers()) do table.insert(survivers, player.Name) pcall(function() player.Character.Humanoid.Died:connect(function() table.remove(survivers, player.Name) table.insert(dead, player.Name) end) end) end
GetSurvivors()
-- /Table inserting and removing and printing
--wait(120)
end |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 01 Dec 2011 06:11 PM |
Why do you have "--" in random spots :l
~The greatest free model is your mind~ |
|
|
| Report Abuse |
|
|
|
| 01 Dec 2011 06:15 PM |
| ^For me to debug it. Incase I really fail at editing, I dont have to reload my script, when I can just delete the --'s. =\ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 02 Dec 2011 02:28 PM |
| Bbbbbbbbbuuuuummmmmmmmmmmmmmmmppppppppkkthanxbaibai |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
|
| 02 Dec 2011 04:57 PM |
^Lol....
BUM:P!!!!!!!!!!!!!!!!!!!!!!!!! |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 03 Dec 2011 07:22 AM |
Coolhelpbro
Now, help me for real! BUMP! |
|
|
| Report Abuse |
|
|
|
| 03 Dec 2011 07:25 AM |
| You called #survivers and there's not a table with survivers. |
|
|
| Report Abuse |
|
|
|
| 03 Dec 2011 07:36 AM |
@Reactor, its there.... Look around the top, inside of the "Tables =3" comment. I have :
survivers = {} |
|
|
| Report Abuse |
|
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
|
| 04 Dec 2011 07:32 AM |
| *Waiting for a very very long time* |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
|
| 04 Dec 2011 08:16 AM |
| *Reads miros post, thinks: DANG IT!* |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 04 Dec 2011 02:12 PM |
| *Doing history homework due tomorrow or else I get a detention* BRB xD |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2011 05:51 PM |
| *Guesses miros grade: 7th? 9th? Idk, this kid is hard to guess.... **Gives up*** Lulz. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Dec 2011 10:15 AM |
| 7th grade...*Does math homework about trigonometry* |
|
|
| Report Abuse |
|
|
|
| 06 Dec 2011 12:23 PM |
I haz a trick for you...
Remember this:
Soh Cah Toa
Now, what is that? Instead of remembering, sin is equal to opposite over hypotenuese, and cosin is equal to adj over hyp, and tan is equal to opp over adj, you remember soh cah toa. Bewmz, your done......... NOW FIXZ MAI SCRIPT! BUMPORZ! |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 06 Dec 2011 12:32 PM |
Let me take a look.
~Myrco; Music lover, nederlands/dutch and a scripter |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 06 Dec 2011 12:47 PM |
It was quite a mess, I just made it into something:
local Workspace = Game:GetService("Workspace") local Players = Game:GetService("Players") local MapParents = Game:GetService("Lighting") local msg = Instance.new("Message", Workspace) local playas = Players:GetPlayers() local Maps = {} local survivers = {} local dead = {} local CurrentMap
for _,Map in pairs(MapParents:GetChildren()) do table.insert(Maps, Map) end
function Updatemap() if type(CurrentMap) == "userdata" then CurrentMap.Parent = MapParents ---? CurrentMap:remove() end msg.Text = "Chosing a random map" local NewMap = Maps[ math.random(1, #Maps) ] NewMap.Parent = Workspace CurrentMap = NewMap msg.Text = "Map Chosen: "..NewMap.Name.."!" wait(3) msg.Text = "" end
function GetSurvivors() local String = "" if #survivers == 0 then msg.Text = "No survivors" end wait(2.5) msg.Text = table.concat(survivers, ", ") wait(3) msg.Text = "" end
while true do msg.Text = "Take a break, 15 seconds before next round!" wait(2) msg.Text = "" playas = Players:GetPlayers() for _,v in pairs (playas) do v.Character.Torso.CFrame = Workspace.TeleSpawn.CFrame + Vector3.new(5,5,0) end for i = 15, 0, -1 do for _,v in pairs(playas) do v.PlayerGui.CountdownGui.Frame.TextButton.Text = i end wait(1) end msg.Text = "Its game time!" wait(2) msg.Text = "" UpdateMap() for i, player in pairs(playas:GetPlayers()) do table.insert(survivers, player.Name) pcall(function() coroutine.resume(coroutine.create(function() player.Character.Humanoid.Died:connect(function() table.remove(survivers, player.Name) table.insert(dead, player.Name) end) end)) end) end GetSurvivors() end
~Myrco; Music lover, nederlands/dutch and a scripter |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Dec 2011 02:17 PM |
@Skipper
I only started learning trigonommetry since the day I started posting in this thread. It's really quite hard to me because I'm young D: |
|
|
| Report Abuse |
|
|