generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Unexpected symbol near )

Previous Thread :: Next Thread 
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 03:33 PM
I get this error all the time, it's guess work how I fix it

end)

end) -- This is the one that's playing up
end
end)



Women are like fine wine, I can't get their tops off
Report Abuse
Iterum is not online. Iterum
Joined: 30 Jan 2009
Total Posts: 1982
14 Aug 2015 03:34 PM
We can't fix this unless you show the rest of the code block.


-ChiefDelta/Discommodate/iC7G/Vulnerite + 100 other accounts
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
14 Aug 2015 03:34 PM
Post full code, you have mismatched parentheses and/or ends
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 03:36 PM
Alright, I used pastebin so it's not one ugly block of code

http://pastebin.com/0Cx6JuCC

But if you don't mind an ugly block of code

--[[SETTINGS]]--

damage = 30 -- Set this to how much damage you want the gun to do



RPM = 600 -- How many rounds a minute can the gun fire?
ammo = 10 -- How much ammo in a clip do you want?
ammostore = 100 -- How many stored rounds do you want?

--[[SETTINGS/]]--


Women are like fine wine, I can't get their tops off
Report Abuse
TheSubatomicalWorld is not online. TheSubatomicalWorld
Joined: 16 Jun 2013
Total Posts: 1193
14 Aug 2015 03:36 PM
We need the full code to fix this, sorry.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 03:36 PM
gg

--[[SETTINGS]]--

damage = 30 -- Set this to how much damage you want the gun to do



RPM = 600 -- How many rounds a minute can the gun fire?
ammo = 10 -- How much ammo in a clip do you want?
ammostore = 100 -- How many stored rounds do you want?

--[[SETTINGS/]]--


local tool = script.Parent
local user

local firingrate = 60 / RPM
local canfire = true
auto = false

tool.Equipped:connect(function(mouse)
user = tool.Parent

if script.Parent:FindFirstChild("ammo") == false then
print("There ain't no ammo vals! better make 'ne")

local a = Instance.new("NumberValue", script.Parent)
a.Name = "ammo"
a.Value = ammo
local b = Instance.new("NumberValue", script.Parent)
b.Name = "storedammo"
b.Value = ammostore
mouse.Button1Down:connect(function()
auto = true
while auto == true do
if canfire == false then return end
canfire = false
if ammo > 0 then
ammo = ammo - 1

-- Mah first ray evar
local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300)
local hit, position = game.Workspace:FindPartOnRay(ray, user)
print(hit) -- This is used for debugging
local hitted = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid")

if hitted then
hitted:TakeDamage(damage)



wait(firingrate)
canfire = true
else
print("Outta ammo broski")

end


end


mouse.Button1Up:connect(function()
print("Button is up")
auto = false
end)

end)
end
end)

Women are like fine wine, I can't get their tops off
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
14 Aug 2015 03:38 PM
You've, uhh... You appear to have connected a MouseUp inside of a MouseDown am I missing something here?
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 03:42 PM
I connected both?

Women are like fine wine, I can't get their tops off
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
14 Aug 2015 03:42 PM
@elunate If you look closer you'll see he has multiple code flow problems likely caused by horrible tabbing practices.

This should be fixed...

--[[SETTINGS]]--

damage = 30 -- Set this to how much damage you want the gun to do



RPM = 600 -- How many rounds a minute can the gun fire?
ammo = 10 -- How much ammo in a clip do you want?
ammostore = 100 -- How many stored rounds do you want?

--[[SETTINGS/]]--


local tool = script.Parent
local user

local firingrate = 60 / RPM
local canfire = true
auto = false

tool.Equipped:connect(function(mouse)
user = tool.Parent

if script.Parent:FindFirstChild("ammo") == false then
print("There ain't no ammo vals! better make 'ne")
local a = Instance.new("NumberValue", script.Parent)
a.Name = "ammo"
a.Value = ammo
local b = Instance.new("NumberValue", script.Parent)
b.Name = "storedammo"
b.Value = ammostore
end
mouse.Button1Down:connect(function()
auto = true
while auto == true do
if canfire == false then return end
canfire = false
if ammo > 0 then
ammo = ammo - 1

-- Mah first ray evar
local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300)
local hit, position = game.Workspace:FindPartOnRay(ray, user)
print(hit) -- This is used for debugging
local hitted = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid")

if hitted then
hitted:TakeDamage(damage)
end

wait(firingrate)
canfire = true
else
print("Outta ammo broski")
end
end
end)
mouse.Button1Up:connect(function()
print("Button is up")
auto = false
end)
end)
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
14 Aug 2015 03:44 PM
op made incorrectly formatted comments
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 03:53 PM
I do -[[ ]]-- for styisation

Women are like fine wine, I can't get their tops off
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
14 Aug 2015 03:57 PM
cnt gets banned for the dumbest reason, and here's this guy with that siggy

Just roblox things
Report Abuse
Iterum is not online. Iterum
Joined: 30 Jan 2009
Total Posts: 1982
14 Aug 2015 04:13 PM
what did cnt get banned for anyway


-ChiefDelta/Discommodate/iC7G/Vulnerite + 100 other accounts
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 04:58 PM
plaz halp

Women are like fine wine, I can't get their tops off
Report Abuse
vacha is not online. vacha
Joined: 06 Jan 2011
Total Posts: 1993
14 Aug 2015 04:58 PM
noo cnt can't be banned, why??????

while true do the do
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
14 Aug 2015 05:19 PM
please help

Women are like fine wine, I can't get their tops off
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image