|
| 05 Dec 2015 06:40 PM |
Error: ')' expected (to close '(' at line 2) near 'elseif'
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local JP = player:FindFirstChild("JumpPower") local SP = player:FindFirstChild("SpeedPower") local HP = player:FindFirstChild("Health") if choice == script.Parent.Powerups.JumpPower then if JP.Value < 4 then local name = player.Name local char = game.Workspace:FindFirstChild(name) if char then if JP.Value == 1 then char.Humanoid.JumpPower = 75 JP.Value = JP.Value + 1 elseif JP.Value == 2 then char.Humanoid.JumpPower = 100 JP.Value = JP.Value + 1 elseif JP.Value == 3 then char.Humanoid.JumpPower = 130 JP.Value = JP.Value + 1 end end end end elseif choice == script.Parent.Powerups.JumpPower then end end)
der he is |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 05 Dec 2015 06:49 PM |
Tab your code and this would be a breeze to find.
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local JP = player:FindFirstChild("JumpPower") local SP = player:FindFirstChild("SpeedPower") local HP = player:FindFirstChild("Health") if choice == script.Parent.Powerups.JumpPower then if JP.Value < 4 then local name = player.Name local char = game.Workspace:FindFirstChild(name) if char then if JP.Value == 1 then char.Humanoid.JumpPower = 75 JP.Value = JP.Value + 1 elseif JP.Value == 2 then char.Humanoid.JumpPower = 100 JP.Value = JP.Value + 1 elseif JP.Value == 3 then char.Humanoid.JumpPower = 130 JP.Value = JP.Value + 1 end end end end elseif choice == script.Parent.Powerups.JumpPower then --pass end end end) |
|
|
| Report Abuse |
|
|
|
| 05 Dec 2015 06:54 PM |
Now its saying: Expected 'end' (to close 'function' at line 2), got 'elseif'
der he is |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 05 Dec 2015 07:02 PM |
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local JP = player:FindFirstChild("JumpPower") local SP = player:FindFirstChild("SpeedPower") local HP = player:FindFirstChild("Health") if choice == script.Parent.Powerups.JumpPower then if JP.Value < 4 then local name = player.Name local char = game.Workspace:FindFirstChild(name) if char then if JP.Value == 1 then char.Humanoid.JumpPower = 75 JP.Value = JP.Value + 1 elseif JP.Value == 2 then char.Humanoid.JumpPower = 100 JP.Value = JP.Value + 1 elseif JP.Value == 3 then char.Humanoid.JumpPower = 130 JP.Value = JP.Value + 1 end end end elseif choice == script.Parent.Powerups.JumpPower then --pass end end end) |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 05 Dec 2015 07:03 PM |
gfd
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local JP = player:FindFirstChild("JumpPower") local SP = player:FindFirstChild("SpeedPower") local HP = player:FindFirstChild("Health") if choice == script.Parent.Powerups.JumpPower then if JP.Value < 4 then local name = player.Name local char = game.Workspace:FindFirstChild(name) if char then if JP.Value == 1 then char.Humanoid.JumpPower = 75 JP.Value = JP.Value + 1 elseif JP.Value == 2 then char.Humanoid.JumpPower = 100 JP.Value = JP.Value + 1 elseif JP.Value == 3 then char.Humanoid.JumpPower = 130 JP.Value = JP.Value + 1 end end elseif choice == script.Parent.Powerups.JumpPower then --pass end end end) |
|
|
| Report Abuse |
|
|