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 expected near end

Previous Thread :: Next Thread 
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
22 May 2012 05:54 PM
What does that mean? I get that with this function:

function onClick()
hasBldng = false
if canPlace == true then
if _G["curBldng"] ~= nil then
table.insert(posTable, N.Position)
print(posTable)
newBldng = bldngDir:findFirstChild(_G["curBldng"]):clone()
newBldng.Parent = game.Workspace
if newBldng:findFirstChild("isPlaced") then
newBldng.isPlaced.Value = true
end
function MoveModel(Model, Cframe, Part)
local primary = Part or Model:GetChildren()[math.random(1, #Model:GetChildren())]
local CF = Cframe or CFrame.new(0,0,0)
local rX, rY, rZ = primary.CFrame:toEulerAnglesXYZ()
local dif = {
}
local rot = {
}
local parts = {
}
wait()
allChildren(Model, parts, dif, rot, primary)
primary.CFrame = CF * CFrame.fromEulerAnglesXYZ(rX, rY, rZ)
for _, v in pairs(rot) do
parts[_].CFrame = (CFrame.new(dif[_]) + CF.p) * v
end
end

function allChildren(Model, p, d, r, primary)
for _, v in pairs(Model:GetChildren()) do
if v ~= primary and v:IsA("BasePart") then
table.insert(p, v)
table.insert(d, CFrame.new(primary.CFrame.p):pointToObjectSpace(v.Position))
table.insert(r, CFrame.fromEulerAnglesXYZ(v.CFrame:toEulerAnglesXYZ()))
end
allChildren(v)
end
end
MoveModel(
newBldng,
(N.CFrame),
newBldng.centerPart
)
end
end
end
end

MrMcAero
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
22 May 2012 06:04 PM
I think you have 3 extra ends, although you might want to double-check.

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
22 May 2012 06:06 PM
Er, only one extra end.

† KMXD †
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
22 May 2012 07:23 PM
After removing an end:

end expected to close function at line:xxx

MrMcAero
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
22 May 2012 07:35 PM
Fixed my problem. I had a bad line of code. :\

MrMcAero
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
22 May 2012 07:40 PM
This is why I tab :3
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