|
| 29 Nov 2012 08:49 PM |
20:45:22 - Workspace.LosePointsOnDeath:16: 'end' expected (to close 'if' at line 12) near 'else'
LoseAmount = 50 coolpeopleLoseAmount = LoseAmount/2 epicpeopleLoseAmount = 0
local Players = Game:GetService("Players") Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) local Humanoid = Character:FindFirstChild("Humanoid") if Humanoid then Humanoid.Died:connect(function() if Game:GetService("GamePassService"):PlayerHasPass(Player, 978978) then return end if Game:GetService("GamePassService"):PlayerHasPass(Player, 343469) then Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - coolpeopleLoseAmount else Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - epicpeopleLoseAmount else Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - LoseAmount end end) end end) end) |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 08:53 PM |
You need an end to close line 12... o.O Meaning, you don't have enough ends.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 08:55 PM |
| Would it be like end or end)? |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 09:00 PM |
Actually, with the first end), erase the ). You only have 2 anonymous functions, and 3 if loops. So it should be:
end end end end) end)
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 09:05 PM |
Still get that same error.
21:04:53 - Workspace.LosePointsOnDeath:16: 'end' expected (to close 'if' at line 12) near 'else'
|
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 09:06 PM |
Is there more to the script? I don't see why it still needs to close.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Nov 2012 09:07 PM |
Whoa whoa whoa, wait.... I just saw that there is another anonymous function in the first if statement. It should go like this: end end end) end end) end)
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Nov 2012 09:15 PM |
I don't get why its not working o.o Edit the script a little bit.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
|
| 29 Nov 2012 09:27 PM |
| You're telling me to edit the script, what do you think I'm trying to do? |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 02:14 PM |
I think you are trying to create where if a player has a certain gamepass, when they die, they only lose a certain amount of points.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Nov 2012 04:07 PM |
@Jonah
Yes, that's exactly what I'm trying to do.
@Bonk
No. |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 04:21 PM |
If you look near the bottom of your code, you are actually using to else's in a row, which is incorrect.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Nov 2012 04:34 PM |
Oh yeah... xD Why didn't I catch that? You can only use else once because else works around the if/elseif statements. Use elseif.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 04:36 PM |
| Can you put it in the script so I can see it? |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 04:37 PM |
if Game:GetService("GamePassService"):PlayerHasPass(Player, 343469) then Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - coolpeopleLoseAmount elseif nepicpeoplegamepass? Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - epicpeopleLoseAmount elseif nogamepass? Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - LoseAmount |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Nov 2012 05:18 PM |
LoseAmount = 50 coolpeopleLoseAmount = LoseAmount/2 epicpeopleLoseAmount = 0
local Players = Game:GetService("Players") Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function(Character) local Humanoid = Character:FindFirstChild("Humanoid") if Humanoid then Humanoid.Died:connect(function() if Game:GetService("GamePassService"):PlayerHasPass(Player, 978978) then return end elseif Game:GetService("GamePassService"):PlayerHasPass(Player, 343469) then Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - coolpeopleLoseAmount elseif Game:GetService("GamePassService"):PlayerHasPass(Player, [Gampass #]) then Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - epicpeopleLoseAmount else Player.leaderstats.XP.Value = Player.leaderstats.XP.Value - LoseAmount end end end) end)
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 05:49 PM |
17:48:10 - Workspace.LosePointsonDeath:12: 'end' expected (to close 'function' at line 10) near 'elseif'
|
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 09:10 PM |
I don't really understand your script enough to rewrite it correctly... Although, use elseif like you would as an if statement. elseif gives an exception to the if statement like...
if part.Transparency = 0 then print("It's 0 Visible! Just what I thought!") elseif part.Transparency = 0.1 then print("It's Slightly invisible... I was close though!") else print("Nope, you weren't close at all.") end
On your script, you just need to rewrite it so that once you have if --player has gamepass etc... then, you put elseif with all the other gamepasses, until there isn't anymore gamepasses left. Then, have else as normal players, that doesn't have gamepasses.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 09:22 PM |
| Just stop trying to help. You aren't helping at all. You tried like 5 times and keep changing what you say about the script. Just stop it. |
|
|
| Report Abuse |
|
|
|
| 30 Nov 2012 09:23 PM |
Change the first elseif in Jonah's script to an if. The other if already has an end.
¤¤ †KMXD† ¤¤ |
|
|
| Report Abuse |
|
|