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 » Scripting Helpers
Home Search
 

Re: Incredibly annoying syntax error.

Previous Thread :: Next Thread 
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 06:53 PM
if (key=="x") and planedebounce == false then
local power = plane.Engine:findFirstChild("FlyScript") or plane.Engine:findFirstChild("FlyScript2")
if (power ~= nil) then
power:remove()
engine.BodyVelocity.velocity = Vector3.new(0,0,0)
engine.BodyVelocity.maxForce = Vector3.new(0,0,0)
local a = 0
vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger";
end
end
if (key=="y") then
local power = plane.Engine:findFirstChild("FlyScript")
if (power ~= nil) then return end
local fly = script.FlyScript:clone()
fly.Disabled = false
engine.BodyVelocity.maxForce = Vector3.new(1e+038,1e+038,1e+038)
fly.Parent = plane.Engine

vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger piloted by"(script.Parent.Parent.Parent.Name); (error occurs here)

vehicle.Parts.color1.BrickColor = BrickColor.new(player.TeamColor);
vehicle.Parts.color2.BrickColor = BrickColor.new(player.TeamColor)


Output: syntax error near ';' (I've marked the exact location)
Report Abuse
blueknight02 is not online. blueknight02
Joined: 30 Sep 2009
Total Posts: 20447
10 May 2012 06:56 PM
Why do you even have ";" in there?

I'm pretty sure you don't need it.
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 06:57 PM
Wiki says it can fix syntax errors.

I guess not.
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
10 May 2012 06:59 PM
vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger piloted by"..script.Parent.Parent.Parent.Name..""
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:04 PM
Thanks.

New error... also doesnt make much sense to me.


Workspace.Smooth Block Model.Stinger.PlaneFlyer:126: unexpected symbol near '='


This is line 126:
vehicle.Parts.color1.BrickColor = player.TeamColor

Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:06 PM
color1 is a brick.

and heirarchy is all set.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
10 May 2012 07:07 PM
vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger piloted by"(script.Parent.Parent.Parent.Name);

Is incorrect in so many ways.

vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger piloted by"..script.Parent.Parent.Parent.Name
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
10 May 2012 07:07 PM
vehicle.Parts.color1.BrickColor = BrickColor.new(player.TeamColor)
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:08 PM
I tried that beforehand.

Same problem.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
10 May 2012 07:12 PM
vehicle.Parts.color1.BrickColor = BrickColor.new(player.TeamColor);
vehicle.Parts.color2.BrickColor = BrickColor.new(player.TeamColor)

Change this to

vehicle.Parts.color1.BrickColor = player.TeamColor
vehicle.Parts.color2.BrickColor = player.TeamColor
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
10 May 2012 07:14 PM
hmm

Try setting a variable to the TeamColor, such as teamcolor = player.TeamColor,

then doing part.BrickColor = BrickColor.new(teamcolor)
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:14 PM
Dark, already did.

Workspace.Smooth Block Model.Stinger.PlaneFlyer:126: unexpected symbol near '='


126 is the first brickcolor change line.
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:19 PM
@mage

Still broken.

It doesnt make any sense.
This SHOULD be working, and there are no unexpected symbols.
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
10 May 2012 07:21 PM
Try changing the parts so there isn't a number in it's name?
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:22 PM
Same error, same line.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
10 May 2012 07:23 PM
vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger piloted by"(script.Parent.Parent.Parent.Name); (error occurs here)


You need an operator.

You can never have two things just sitting next to each other*.


vehicle.Parts.back.GUI.Frame.TextLabel.Text = "Stinger piloted by" ..(script.Parent.Parent.Parent.Name)

You want the concatenation operator, which is ..


PEOPLE, stop posting if you don't know what the solution is! It just confuses things!


(* string literals and table literals can immediately follow a function name, under some conditions)
Report Abuse
mage11561 is not online. mage11561
Joined: 03 Sep 2008
Total Posts: 13217
10 May 2012 07:24 PM
@Blue,

that was fixed LONG ago,

please read the whole thread before posting,

thanks.
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:25 PM
@Blue

That issue hs already been resolved.

& also, why would I come here for help if I knew the solution?
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:34 PM
Im afraid Im going to have to bump this.
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:35 PM
Note: when I removed both brickcolor statements out of frustration, this came up.

Workspace.Smooth Block Model.Stinger.PlaneFlyer:131: unexpected symbol near 'end'

Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
10 May 2012 07:56 PM
Help with the unexpected symbol error would be greatly appreciated.
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
10 May 2012 08:10 PM
2 ends, 3 if statements...
Report Abuse
iPremiumZ is not online. iPremiumZ
Joined: 23 Jan 2012
Total Posts: 6834
10 May 2012 08:11 PM
4 if statements*
Report Abuse
Wordsarecool is not online. Wordsarecool
Joined: 20 Sep 2008
Total Posts: 4273
11 May 2012 07:42 PM
Excuse me?
Report Abuse
vat21s is not online. vat21s
Joined: 07 Jun 2010
Total Posts: 2508
11 May 2012 08:56 PM
This is NOT Java
it's RBX Lua

Variables do not need ' ; ' so please remove it...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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