Tribes78
|
  |
| Joined: 01 Sep 2006 |
| Total Posts: 1311 |
|
|
| 28 Jul 2011 04:25 PM |
So I'm writing a script and this line is having trouble with the Output.
if board.SkateboardPlatform.InAir == true then
The output says this;
Players.Tribes78.Backpack.Fliptricks.SpinsQE:22: '=' expected near 'if'
I require assistance. |
|
|
| Report Abuse |
|
|
| |
|
Tribes78
|
  |
| Joined: 01 Sep 2006 |
| Total Posts: 1311 |
|
|
| 28 Jul 2011 04:27 PM |
Okay..
turn = 0 function onKeyDown(key) board = script.Parent.Parent.Parent.Character:FindFirstChild("Board") if board ~= nil then if board.SkateboardPlatform.InAir == true and key == "q" then turn = -1.5 end if board.SkateboardPlatform.InAir == true and key == "e" then turn = 1.5 end end end
function s(mouse) mouse.KeyDown:connect(onKeyDown) end
while true do wait(0.1) script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro if script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.InAir == true then script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000) script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0) end end
script.Parent.Selected:connect(s) |
|
|
| Report Abuse |
|
|
Tribes78
|
  |
| Joined: 01 Sep 2006 |
| Total Posts: 1311 |
|
|
| 28 Jul 2011 04:27 PM |
| The posting glitched. Some of the lines are skewed. |
|
|
| Report Abuse |
|
|
Tribes78
|
  |
| Joined: 01 Sep 2006 |
| Total Posts: 1311 |
|
|
| 28 Jul 2011 04:32 PM |
I was messing with the script some more trying to fix it, and it's looking like an output problem, or a problem with the game more so than a problem with my script (Which I'm sure is full of glitches).
I know this because I got rid of the if function in the while true do function, and the output is still saying that that line of text requires an '=' near the first word of the line (which is script... what)
You can go ahead and ignore this, I'm going to rewrite the script and see what happens. |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2011 04:33 PM |
turn = 0 function onKeyDown(key) board = script.Parent.Parent.Parent.Character:FindFirstChild("Board") if board ~= nil then if board.SkateboardPlatform.InAir == true and key == "q" then turn = -1.5 end if board.SkateboardPlatform.InAir == true and key == "e" then turn = 1.5 end end end
function s(mouse) mouse.KeyDown:connect(onKeyDown) end
while true do wait(0.1) script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro if script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.InAir == true then script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000) script.Parent.Parent.Parent.Character:FindFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0) end end
script.Parent.Selected:connect(s) |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2011 04:33 PM |
That's the same thing, I was trying to fix it, nothing changed I was looking at it. Sorry! |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2011 04:35 PM |
| Why is there an end after if, then it continues without a function line? |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2011 04:36 PM |
What is InAir? I'm not much of a scripter according to Scriptars, but I'll do my best. |
|
|
| Report Abuse |
|
|
| |
|
Kalandri
|
  |
| Joined: 25 Sep 2010 |
| Total Posts: 26 |
|
|
| 28 Jul 2011 04:42 PM |
turn = 0 function onKeyDown(key) board = script.Parent.Parent.Parent.Character:findFirstChild("Board") if board ~= nil then if board.SkateboardPlatform.InAir == true and key == "q" then turn = -1.5 end if board.SkateboardPlatform.InAir == true and key == "e" then turn = 1.5 end end end
function s(mouse) mouse.KeyDown:connect(onKeyDown) end
while true do wait(0.1) script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro if script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.InAir == true then script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000) script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0) end end
script.Parent.Selected:connect(s)
How about know? |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2011 04:43 PM |
turn = 0 function onKeyDown(key) board = script.Parent.Parent.Parent.Character:findFirstChild("Board") if board ~= nil then if board.SkateboardPlatform.InAir == true and key == "q" then turn = turn -1.5 end if board.SkateboardPlatform.InAir == true and key == "e" then turn = turn +1.5 end end end
function s(mouse) mouse.KeyDown:connect(onKeyDown) end
while true do wait(0.1) script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro if script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.InAir == true then script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000) script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0) end end
script.Parent.Selected:connect(s)
|
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 28 Jul 2011 05:21 PM |
turn = 0 function onKeyDown(key) board = script.Parent.Parent.Parent.Character:findFirstChild("Board") if board ~= nil then if board.SkateboardPlatform.InAir == true and key == "q" then turn = turn -1.5 elseif board.SkateboardPlatform.InAir == true and key == "e" then turn = turn +1.5 end end end mouse.KeyDown:connect(onKeyDown)
function s(mouse)
while true do wait(0.1) if script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.InAir == true then script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.maxTorque = Vector3.new(5000,5000,5000) script.Parent.Parent.Parent.Character:findFirstChild("Board").SkateboardPlatform.BodyGyro.CFrame = board.SkateboardPlatform.CFrame * CFrame.fromEulerAnglesXYZ(0, (turn), 0) end end end
script.Parent.Selected:connect(s)
|
|
|
| Report Abuse |
|
|