Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[UPDATE!] The output says that i need to close my function on line 32... ????????

Asked by
xVanc -1
8 years ago
Edited 8 years ago

I'm sorry for the inconvenience, I have released I had many spelling errors, and other errors. I've fixed those mistakes, though there is still a problem. It says that I need to close my function on line 32... I did..? Btw, I changed the localscript below.

01game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
02 
03local players = game:GetService("Players")
04local inputService = game:GetService("UserInputService")
05 
06local player = players.LocalPlayer
07local character = playerCharacter or player.CharacterAdded:wait()
08local humanoid = character:WaitForChild("Humanoid")
09 
10local stamina = 100
11 
12local Interface = {}
13do
14    local playerGui = player:WaitForChild("PlayerGui")
15 
View all 62 lines...
0
Are you sure it's not line 6 where you have players:LocalPlayer instead of players.LocalPlayer? General_Scripter 425 — 8y
0
uhh lemme see xVanc -1 — 8y
0
oh, no when i replaced the : with . it gave me another error at line 46 where it has )) xVanc -1 — 8y
0
You shouldn't do this on the client entirely because people can hack it. Update it on the client, manage the stamina on the server. User#15029 30 — 8y
View all comments (4 more)
0
What is the actual error? 'output says there is something wrong with the 7th line' isn't very descriptive. User#15029 30 — 8y
0
i dont know how to do that, and also the erorr is on line 7 it says, "Expected '(', '{' or <string> got 'local'" xVanc -1 — 8y
0
idk what to do when it does that xVanc -1 — 8y
0
Added an answer based on the output. User#15029 30 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

"Expected '(', '{' or <string> got 'local'" says to me that it's a syntax error. I looked at the line before and spotted something that would confuse the heck out of lua.

You have a colon on line six, so lua thinks you're calling a method or something and is expecting a parameter or just ().

Replace the : with a . on line six and you'll be just fine!

EDIT:

Looking at your new problem, you should just add an end) to end the anonymous function at line 32.

01game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
02 
03local players = game:GetService("Players")
04local inputService = game:GetService("UserInputService")
05 
06local player = players.LocalPlayer
07local character = playerCharacter or player.CharacterAdded:wait()
08local humanoid = character:WaitForChild("Humanoid")
09 
10local stamina = 100
11 
12local Interface = {}
13do
14    local playerGui = player:WaitForChild("PlayerGui")
15 
View all 63 lines...
0
thanks! xVanc -1 — 8y
0
Just add an 'end' and a ')' to close the anonymous function at line 32. User#15029 30 — 8y
Ad

Answer this question