|
| 07 Mar 2012 07:58 PM |
Hello,
I have this script, and on line 8 it says, "then" is expected to be near "=". Please help:
script.Parent = game.Workspace wait(1) --Game Time if game.Players.NumPlayers = 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players"
else local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "New Game Starting in 10..." wait(0.1) m.Text = "New Game Starting in 9..." wait(0.1) m.Text = "New Game Starting in 8..." wait(0.1) m.Text = "New Game Starting in 7..." wait(0.1) m.Text = "New Game Starting in 6..." wait(0.1) m.Text = "New Game Starting in 5..." wait(0.1) m.Text = "New Game Starting in 4..." wait(0.1) m.Text = "New Game Starting in 3..." wait(0.1) m.Text = "New Game Starting in 2..." wait(0.1) m.Text = "New Game Starting in 1..." wait(1) m.Text = "Game Loaded" |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Mar 2012 07:59 PM |
script.Parent = game.Workspace wait(1) --Game Time if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" else local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "New Game Starting in 10..." wait(0.1) m.Text = "New Game Starting in 9..." wait(0.1) m.Text = "New Game Starting in 8..." wait(0.1) m.Text = "New Game Starting in 7..." wait(0.1) m.Text = "New Game Starting in 6..." wait(0.1) m.Text = "New Game Starting in 5..." wait(0.1) m.Text = "New Game Starting in 4..." wait(0.1) m.Text = "New Game Starting in 3..." wait(0.1) m.Text = "New Game Starting in 2..." wait(0.1) m.Text = "New Game Starting in 1..." wait(1) m.Text = "Game Loaded"
† KMXD † |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 07 Mar 2012 07:59 PM |
if game.Players.NumPlayers = 1 then --2 Equal signs
if game.Players.NumPlayers == 1 then |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Mar 2012 07:59 PM |
> game.Players.NumPlayers = 1
= defines ==compares
you need == |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 07 Mar 2012 08:00 PM |
| I blame my late toasts on my failed username... |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Mar 2012 08:03 PM |
Wait one more thing, I updated it a bit now at line 10 it says < eof > expected near else:
script.Parent = game.Workspace wait(1) --Game Time if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" end
else if local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "New Game Starting in 10..." wait(0.1) m.Text = "New Game Starting in 9..." wait(0.1) m.Text = "New Game Starting in 8..." wait(0.1) m.Text = "New Game Starting in 7..." wait(0.1) m.Text = "New Game Starting in 6..." wait(0.1) m.Text = "New Game Starting in 5..." wait(0.1) m.Text = "New Game Starting in 4..." wait(0.1) m.Text = "New Game Starting in 3..." wait(0.1) m.Text = "New Game Starting in 2..." wait(0.1) m.Text = "New Game Starting in 1..." wait(1) m.Text = "Game Loaded" |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 07 Mar 2012 08:05 PM |
Both at the bottom.
† KMXD † |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 07 Mar 2012 08:05 PM |
2 ends? He only needs 1.
if elseif end
~Tada |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:06 PM |
Still has the same error:
--LOADER V.1--------------------------------------------------------------------------------------------- --MADE BY 1billybob1 DO NOT STEAL------------------------------------------------------------------------ --USED FOR MY GAMES--------------------------------------------------------------------------------------
script.Parent = game.Workspace wait(1) --Game Time if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" end else if local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "New Game Starting in 10..." wait(0.1) m.Text = "New Game Starting in 9..." wait(0.1) m.Text = "New Game Starting in 8..." wait(0.1) m.Text = "New Game Starting in 7..." wait(0.1) m.Text = "New Game Starting in 6..." wait(0.1) m.Text = "New Game Starting in 5..." wait(0.1) m.Text = "New Game Starting in 4..." wait(0.1) m.Text = "New Game Starting in 3..." wait(0.1) m.Text = "New Game Starting in 2..." wait(0.1) m.Text = "New Game Starting in 1..." wait(1) m.Text = "Game Loaded" end end
|
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 07 Mar 2012 08:06 PM |
Oh wait never mind, He typed in else if not elseif.
Broski you gotta put the else and the if on two seperate lines are also my Brain will be unable to comprehend the assets you have displayed >:| |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 07 Mar 2012 08:08 PM |
See!?!?!? 'lines are also' 'lines or also' I just made my typo of the day >:/ |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:08 PM |
@Billy Remove the "end" in the beginning of the script.
@xvg
Yea, I prefer "elseifs".
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:09 PM |
| It still says < eof > expected near else. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:10 PM |
Post the script again.
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:11 PM |
wait I got that fixed. Theres only one more problem.
script.Parent = game.Workspace wait(1) --Game Time if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" elseif local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "New Game Starting in 10..." wait(0.1) m.Text = "New Game Starting in 9..." wait(0.1) m.Text = "New Game Starting in 8..." wait(0.1) m.Text = "New Game Starting in 7..." wait(0.1) m.Text = "New Game Starting in 6..." wait(0.1) m.Text = "New Game Starting in 5..." wait(0.1) m.Text = "New Game Starting in 4..." wait(0.1) m.Text = "New Game Starting in 3..." wait(0.1) m.Text = "New Game Starting in 2..." wait(0.1) m.Text = "New Game Starting in 1..." wait(1) m.Text = "Game Loaded" end end
line 9 says: unexpected symbol near local. |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Mar 2012 08:11 PM |
> if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" end else if
if you have that end there you can't use `else` or `elseif`.
if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" elseif--no space==one end needed
then at the end just have one end. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:12 PM |
script.Parent = game.Workspace wait(1) --Game Time if game.Players.NumPlayers == 1 then local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Not enough players" else local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "New Game Starting in 10..." wait(0.1) m.Text = "New Game Starting in 9..." wait(0.1) m.Text = "New Game Starting in 8..." wait(0.1) m.Text = "New Game Starting in 7..." wait(0.1) m.Text = "New Game Starting in 6..." wait(0.1) m.Text = "New Game Starting in 5..." wait(0.1) m.Text = "New Game Starting in 4..." wait(0.1) m.Text = "New Game Starting in 3..." wait(0.1) m.Text = "New Game Starting in 2..." wait(0.1) m.Text = "New Game Starting in 1..." wait(1) m.Text = "Game Loaded" end
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:13 PM |
What? I feel like xvg. . . D:
† KMXD † |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 07 Mar 2012 08:13 PM |
| oh yeah it also should be else not elseif because it has no condition. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 08:15 PM |
| Ah, most of it works, also, is NumPlayer a behavior? |
|
|
| Report Abuse |
|
|