|
| 14 May 2014 11:53 AM |
| How do I deal with this??? I see it all the time! 'end' expected near 'else' |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 14 May 2014 11:54 AM |
| thnks for giving us the code |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:54 AM |
how are we supposed to know if you dont give us the script.
|
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:55 AM |
if statement then --code else --code --oops forgot an end right here.. end
or something,your missing an end is the point.. |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:56 AM |
it doesnt matter wat the script is :p even if I said function onClick(Clicked) if lalala == lalala then Frame.Visible = true else Frame.Visible = false
script.Parent.Button1Click:connect(onClick)
that was just an example... it happens with everything! |
|
|
| Report Abuse |
|
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 14 May 2014 11:57 AM |
function onClick(Clicked) if lalala == lalala then Frame.Visible = true else Frame.Visible = false FKING END HERE
script.Parent.Button1Click:connect(onClick)
|
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:57 AM |
| islandmaker, thats wwat I tried doing, and no matter were I put the ends or how much, it doesnt work :/ |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:58 AM |
give us your script then you tool.
|
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:58 AM |
| wazap, I already have an end there, no matter how many I put its useless :p |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 11:58 AM |
function onClick(Clicked)
if lalala == lalala then Frame.Visible = true else Frame.Visible = false end
end --END --GOES --THERE --END TO END THE IF STATEMENT --END TO END THE FUNCTION
script.Parent.Button1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 14 May 2014 11:59 AM |
rusrs
function onClick(Clicked) if lalala == lalala then Frame.Visible = true else Frame.Visible = false end end
script.Parent.Button1Click:connect(onClick)
gg no re |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:00 PM |
@wazap I don't usually ask ppl to come to my thread via other threads but.. no one is replying
Ive never used bodythrust and.. |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:01 PM |
k, here's my script, but sry, I cant give away my Plans so I'll rename the important names...
Name = script.Parent.Parent.Name Name1 = script.Parent.Parent.Parent.Name1
function OnClick(Clicked) if Name1:GetChildren()>0 then Name1:ClearAllChildren() local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 else local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 end
script.Parent.MouseButton1Click:connect(OnClick) |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:01 PM |
you're missing so many ends.
|
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:02 PM |
| yeah but I tried adding them, I added like 30 ends and it didnt work :p |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:03 PM |
for loop --needs an end function --needs an end if statement --needs an end
Name = script.Parent.Parent.Name Name1 = script.Parent.Parent.Parent.Name1
function OnClick(Clicked)--needs an enddddd if Name1:GetChildren()>0 then--needs an endddd Name1:ClearAllChildren() local children = Name:GetChildren()
for i = 1, #children do children[i]:clone().Parent = Name1 end--end here,of the for loop
else
local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 end--end of for loop end--end of if statement end--end of function
|
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:05 PM |
if condition then
else
end
*facebrick* |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:07 PM |
| islandmaker, just tried it, doesnt work D: |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:10 PM |
Heres a suggestion For every if/for/while statement you create, add a tab to the next line
For each tab you add, you need an end after that
For example (pretend the ... is a tab):
function onTouched(hit) ...if hit.Parent:findFirstChild("Humanoid") then ......if not hit.Parent:findFirstChild("LavaArmor") then -- Just an example :P .........hit.Parent.Humanoid.Health = 0 ......end ...end end
script.Parent.Touched:connect(onTouched)
|
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:11 PM |
function OnClick(Clicked) if Name1:GetChildren()>0 then Name1:ClearAllChildren() local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 end else local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 end end
script.Parent.MouseButton1Click:connect(OnClick) |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:13 PM |
| lol sry clone, but am confused... am so tired, didnt sleep for ages and just came back from school sleepy so am confused... lol sry |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:14 PM |
@de your missing the end of function
function OnClick(Clicked) if Name1:GetChildren()>0 then Name1:ClearAllChildren() local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 end else local children = Name:GetChildren() for i = 1, #children do children[i]:clone().Parent = Name1 end end end |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:15 PM |
| despizer, are u 100% sure about that? cos I dont think its a food idea to 'end' if the script still has to run the things below, but a well... I'll try stick with that then... |
|
|
| Report Abuse |
|
|
|
| 14 May 2014 12:15 PM |
Think of it as like a system of layers.
For every layer you create, you have to end it as well. The Tab key is the key found above the caps lock key. Its a single key that is 5 spaces long, and you can use that to organize what block you are on and how many ends you need. |
|
|
| Report Abuse |
|
|