|
| 01 Feb 2013 06:28 PM |
(Part one of a script)
local guests = game.Players:GetPlayers() for i = 1, #guests do if v ~= nil then if guests.Character.TeamColor == BrickColor.new("Bright red") then guests.leaderstats.Points.Value = guests.leaderstats.Points.Value + 20 --20 extra points to winners end else guests.leaderstats.Points.Value = guests.leaderstats.Points.Value + 10 --10 extra points to losers end end
(Part two of a script; this part comes after the first part)
local gscript = game.Workspace:findFirstChild("Game script") while wait() do if gscript.Disabled == false then return end end else gscript.Disabled = false end
The output says that I have misplaced, not added, or added too many ends. I tried to detect the problem, but I could not. However, I believe the problem lies somewhere in these two parts of my script, since the script operated fine before those two parts. |
|
|
| Report Abuse |
|
|
|
| 01 Feb 2013 06:32 PM |
local guests = game.Players:GetPlayers() for i = 1, #guests do if v ~= nil then
What is v?
ιησя∂ιηαтυѕ |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
|
| 01 Feb 2013 06:35 PM |
Didn't define 'v' in the 1st part.
For the first one, you just got confused about where to end; you ended the if statement, used else, did something, then ended the loop.
if gscript.Disabled == false then return else gscript.Disabled = false end end--end while loop |
|
|
| Report Abuse |
|
|