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 » Scripting Helpers
Home Search
 

Re: eof.... can't find the misplaced/missing end :\

Previous Thread :: Next Thread 
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 01:19 PM
You require 14 ends in the second portion of your script, yet you have 16.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
08 Feb 2012 01:22 PM
i only count 14 ends :o

~I script Awesome sauce to go with my spaghetti code
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 01:26 PM
There are 16. You may have overlooked the ends attached to your break conditions. ^_^
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 01:33 PM
But it also shows the advantage of tabbing your code. Basically, one end per tab. :)
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
roboslayer10 is not online. roboslayer10
Joined: 08 Aug 2011
Total Posts: 206
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 is not online. 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
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
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 is not online. 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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Feb 2012 03:20 PM
@Squibs Nuh.

† KMXD †
Report Abuse
squibs47 is not online. 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 is not online. Altruist
Joined: 06 Feb 2012
Total Posts: 24
08 Feb 2012 04:04 PM
You removed him from the game on death.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
08 Feb 2012 04:06 PM
@Alt

Not even... that function won't even work.

† KMXD †
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
08 Feb 2012 05:59 PM
@MrGames

0160
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
08 Feb 2012 06:00 PM
  thanks :3

~I script Awesome sauce to go with my spaghetti code
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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