|
| 08 Feb 2012 01:12 PM |
Workspace.node.radius.Script:71: 'eof' expected near 'end' -- line 71 be the last line... not much help. if anyone is wondering, this is for a capturable node.
local blue = 0 local red = 0
function update() blue = 0 red = 0 p = game.Players:GetChildren() for i = 1, #p do if p[i].Character:findFirstChild("Torso") ~= nil then if (p[i].Character.Torso.Position - script.Parent.Position).magnitude <= 17 then if p[i].TeamColor == BrickColor.new("Bright red") then red = red + 1 print("red:"..red) end if p[i].TeamColor == BrickColor.new("Bright blue") then blue = blue + 1 print("blue:"..blue) end end end end end
while wait() do
update()
if blue > red then if script.Parent.Parent.Head.BillboardGui.TextLabel.Text ~= "RFE" then script.Parent.Parent.Head.BillboardGui.TextLabel.Text = "RFE" end if script.Parent.Parent.color.BrickColor ~= BrickColor.new("Bright blue") then for i = 1,30 do print("RFE capturing") update() if blue < red or blue == red then break end wait(1) script.Parent.Parent.Head.BillboardGui.TextLabel.Text = i if i == 30 then script.Parent.Parent.Head.BillboardGui.TextLabel.Text = "RFE" script.Parent.Parent.color.BrickColor = BrickColor.new("Bright blue") script.Parent.Decal1.Texture = "http://www.roblox.com/asset/?id=65277845" script.Parent.Decal2.Texture = "http://www.roblox.com/asset/?id=65277845" end end end end end -- red team capturing if blue < red then if script.Parent.Parent.Head.BillboardGui.TextLabel.Text ~= "Raiders" then script.Parent.Parent.Head.BillboardGui.TextLabel.Text = "Raiders" end if script.Parent.Parent.color.BrickColor ~= BrickColor.new("Bright red") then for i = 1,30 do print("Raiders capturing...") update() if blue > red or blue == red then break end wait(1) script.Parent.Parent.Head.BillboardGui.TextLabel.Text = i if i == 30 then script.Parent.Parent.Head.BillboardGui.TextLabel.Text = "Raiders" script.Parent.Parent.color.BrickColor = BrickColor.new("Bright red") script.Parent.Decal1.Texture = "http://www.roblox.com/asset/?id=65272316" script.Parent.Decal2.Texture = "http://www.roblox.com/asset/?id=65272316" end end end end end if blue == red then end end
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 01:19 PM |
| You require 14 ends in the second portion of your script, yet you have 16. |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 01:22 PM |
i only count 14 ends :o
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 01:26 PM |
| There are 16. You may have overlooked the ends attached to your break conditions. ^_^ |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 01:31 PM |
durp, i totally skipped over that. Thats one disadvantage of putting the end on the same line...
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 01:33 PM |
| But it also shows the advantage of tabbing your code. Basically, one end per tab. :) |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 01:36 PM |
mmm... yes, this is an older piece of code and i just decided to tab it , but doing that i missed the 'break end' and then mistakenly added an additional end :P
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 02:58 PM |
woah, can u teach me the stuff in the scripting? i can edit scripts but not make them :S i can change color, direction, print, and transparancy, relfectance, kill, remove, and some other stuff, but i would like it if u teach me more values ect.
function (OnDeath) if x = game.Workspace.roboslayer10.humanoid y = game.Workspace.roboslayer10 x.health = 0 then y = nil end
function (OnDeath)
i think that would work. i can tag too. :D that would kill me and ban me when it kills me
|
|
|
| Report Abuse |
|
|
squibs47
|
  |
| Joined: 14 Feb 2010 |
| Total Posts: 339 |
|
|
| 08 Feb 2012 03:14 PM |
@roboslayer10 that wouldn't do anything. You haven't tagged anything, and after you tag you or whatever, you have to put =true or =false. But good attempt.
You can't Spell Epic without Pie ~Squibs47 |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 03:17 PM |
| Why not learn to use block code. It HELPS YOUR CODING. Also i'm reading other errors in the code :/ |
|
|
| Report Abuse |
|
|
squibs47
|
  |
| Joined: 14 Feb 2010 |
| Total Posts: 339 |
|
|
| 08 Feb 2012 03:18 PM |
x=game.Workspace.robloslayer10
function(onDeath) if x.Humanoid.Health = 0 then game.Players.roboslayer10:Remove() end end
script.Parent.newPlayerAdded:connect(onDeath)
Something like that. I'm not good with manipulating Characters. :P
You can't Spell Epic without Pie ~Squibs47 |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 03:19 PM |
while this thread is derailed... whats the alt code for the fake space? so i can tab my code on the forums.
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|
| |
|
squibs47
|
  |
| Joined: 14 Feb 2010 |
| Total Posts: 339 |
|
|
| 08 Feb 2012 03:22 PM |
@knightmarexd Is it that bad? D:
You can't Spell Epic without Pie ~Squibs47 |
|
|
| Report Abuse |
|
|
Altruist
|
  |
| Joined: 06 Feb 2012 |
| Total Posts: 24 |
|
|
| 08 Feb 2012 04:04 PM |
| You removed him from the game on death. |
|
|
| Report Abuse |
|
|
|
| 08 Feb 2012 04:06 PM |
@Alt
Not even... that function won't even work.
† KMXD † |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Feb 2012 06:00 PM |
thanks :3
~I script Awesome sauce to go with my spaghetti code |
|
|
| Report Abuse |
|
|