|
| 26 May 2012 09:33 PM |
H = Instance.new("Hint", Workspace) TA = game.Teams.Delta TB = game.Teams.Spetnaz TC - game.Workspace.Neutral T1 = TA.Name T2 = TB.Name T3 = TC.Name
while wait() do if game.Workspace.Flags["Flag A"].Flag.BrickColor == TA.TeamColor then A = T1 else A = T2 else A = T3 end if game.Workspace.Flags["Flag B"].Flag.BrickColor == TA.TeamColor then B = T1 else B = T2 else B = T3 end if game.Workspace.Flags["Flag C"].Flag.BrickColor == TA.TeamColor then C = T1 else C = T2 else C = T3 end H.Text = ("Flag A - "..A.." | Flag B - "..B.."| Flag C - "..C) end
I was just wondering why this wasn't working, I looked it over and couldn't see a mistake D: |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:34 PM |
Nevermind. Just saw it as I was looking this post over :l |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 May 2012 09:35 PM |
H = Instance.new("Hint", Workspace) TA = game.Teams.Delta TB = game.Teams.Spetnaz TC = game.Workspace.Neutral T1 = TA.Name T2 = TB.Name T3 = TC.Name
while wait() do if game.Workspace.Flags["Flag A"].Flag.BrickColor == TA.TeamColor then A = T1 else A = T2 else A = T3 end if game.Workspace.Flags["Flag B"].Flag.BrickColor == TA.TeamColor then B = T1 else B = T2 else B = T3 end if game.Workspace.Flags["Flag C"].Flag.BrickColor == TA.TeamColor then C = T1 else C = T2 else C = T3 end H.Text = ("Flag A - "..A.." | Flag B - "..B.."| Flag C - "..C) end Fixed mistake, still not working D: |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:36 PM |
:35:23 - Workspace.Flags.Script:14: 'end' expected (to close 'if' at line 10) near 'else' 20:35:23 - Humanoid is not a valid member of Model 20:35:23 - Script "Workspace.Residential.Downed Heli.Head.Health", Line 4 20:35:23 - stack end 20:35:23 - Workspace.LinkedLeaderboard:1: unexpected symbol near '%'
|
|
|
| Report Abuse |
|
|
Hunterfj1
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 501 |
|
|
| 26 May 2012 09:36 PM |
I'm not the best scripter, but I do believe the comma in ("Hint", Workspace) is supposed to be a period.
~I'ma space-bound rocket ship and your heart's the mooo000000ooonnnn!!!~ |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:38 PM |
| No, because in an Instance thing, the first thing says what the ClassName would be, and the second would say what the parent of the new object should be. |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:39 PM |
@Hunter One of the working scripts on my game has it just like that, so it can't be that x.x |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:39 PM |
| Don't worry jack, that part is right. In fact, you actually save a few milliseconds doing it that way. |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:40 PM |
| You also save typing time. |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 09:41 PM |
| So I'm still not understanding what is wrong by the output . . . |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 May 2012 10:00 PM |
I think I see the problem, and correct me if I'm wrong genius scripters' This won't work because your telling the script, to have it be TB, if it can't be T1 because it doesn't equal the color, right? So it can't understand the other else, right? |
|
|
| Report Abuse |
|
|
|
| 26 May 2012 10:16 PM |
I take it teh good people are offline? D:
|
|
|
| Report Abuse |
|
|
|
| 26 May 2012 10:18 PM |
I no longer need help with this at this time as
H = Instance.new("Hint",Workspace) TA = game.Teams.Delta TB = game.Teams.Spetnaz TC = game.Worksapce.Neutral T1 = TA.Name T2 = TB.Name T3 = TC.Name
while wait() do if game.Workspace.Flags["Flag A"].Flag.BrickColor == TA.TeamColor then A = T1 else if game.Workspace.Flags["Flag A"].Flag.BrickColor == TB.TeamColor then A = T2 else A = T3 end end if game.Workspace.Flags["Flag B"].Flag.BrickColor == TA.TeamColor then B = T1 else if game.Workspace.Flags["Flag B"].Flag.BrickColor == TB.TeamColor then B = T2 else B = T3 end end if game.Workspace.Flags["Flag C"].Flag.BrickColor == TA.TeamColor then C = T1 else if game.Workspace.Flags["Flag C"].Flag.BrickColor == TB.TeamColor then C = T2 else C = T3 end end H.Text = ("Flag A - "..A.." | Flag B - "..B.."| Flag C - "..C) end
is seeming to work. |
|
|
| Report Abuse |
|
|