|
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" |
|
|
|
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 † |
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
if
game.Players.NumPlayers = 1 then --2 Equal signs
if
game.Players.NumPlayers == 1 then |
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
> game.Players.NumPlayers = 1
= defines
==compares
you need == |
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
I blame my late toasts on my failed username... |
|
|
|
Wait one more thing, I updated it a bit now at line 10 it says 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" |
|
|
|
You need 2 ends.
† KMXD † |
|
|
|
Both at the bottom.
† KMXD † |
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
2 ends?
He only needs 1.
if
elseif
end
~Tada |
|
|
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
|
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
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 >:| |
|
xvgigakidJoin Date: 2008-06-22 Post Count: 4407 |
See!?!?!?
'lines are also'
'lines or also'
I just made my typo of the day >:/ |
|
|
@Billy
Remove the "end" in the beginning of the script.
@xvg
Yea, I prefer "elseifs".
† KMXD † |
|
|
It still says expected near else. |
|
|
Post the script again.
† KMXD † |
|
|
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. |
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
> 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. |
|
|
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 † |
|
|
What? I feel like xvg. . . D:
† KMXD † |
|
SDuke524Join Date: 2008-07-29 Post Count: 6267 |
oh yeah it also should be else not elseif because it has no condition. |
|
|
Ah, most of it works, also, is NumPlayer a behavior? |
|