M39a9am3R
|
  |
| Joined: 10 Nov 2012 |
| Total Posts: 1933 |
|
|
| 09 Mar 2014 07:13 AM |
I had made a terminal and checkpoint for a friend, it used to work just fine until after a few updates and now we're getting this error in the Remote System Monitor, Checkpoint: TeamColor is not a valid member of Script on line 44. Terminal: TeamColor is not a valid member of Script on line 40.
Here's the code for the checkpoint where the error occurred; if messvis == 0 then for i,v in pairs(game.Teams:GetChildren()) do if v.TeamColor == attemptedclaimer then _G.message = script.Parent.Name .. " has been captured by " .. v.Name .. "." script.Parent.Messenger.Disabled = false messvis = 1 end end end
And for the Terminal; if messvis == 0 then for i,v in pairs(game.Teams:GetChildren()) do if v.TeamColor == attemptedclaimer then _G.message = script.Parent.Name .. " has been captured by " .. v.Name .. "." script.Parent.Messenger.Disabled = false messvis = 1 end end end
They are the same error, and I don't get what the problem is. It should just be checking if the team's color is equal to the claiming team's color... |
|
|
| Report Abuse |
|
|
M39a9am3R
|
  |
| Joined: 10 Nov 2012 |
| Total Posts: 1933 |
|
| |
|
M39a9am3R
|
  |
| Joined: 10 Nov 2012 |
| Total Posts: 1933 |
|
| |
|
GFXdylan
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 679 |
|
|
| 09 Mar 2014 10:11 AM |
| Using the _G aka the global function is not really a good option? |
|
|
| Report Abuse |
|
|
M39a9am3R
|
  |
| Joined: 10 Nov 2012 |
| Total Posts: 1933 |
|
|
| 09 Mar 2014 12:12 PM |
| The script was fixed, turns out there was a script under the Teams Service. And the _g. is for messages only. And at that time I did not know how to use coroutines. |
|
|
| Report Abuse |
|
|