Help with my scoreboard

Hey

Im a LUA noob, and would like to know how i can get the jobs to show up in this scoreboard. It is returing a lua error, can anyone help?


local 	Columns = {}
			Columns[1] = {name="Name", command=function(self, arg) return tostring(arg:Name()) end}
			Columns[2] = {name="Team", command=function(self.Player.DarkRPVars and self.Player.DarkRPVars.job or team.GetName(self.Player:Team()) end}
			Columns[3] = {name="Ping", command=function(self, arg) return tostring(arg:Ping()) end}


[LUA]
Columns[2] = {name=“Team”, command=function(self.Player.DarkRPVars and self.Player.DarkRPVars.job or team.GetName(self.Player:Team())) end}
[/LUA]

You forgot a )

Thank you so much.

However it’s returning this



[ERROR] lua/autorun/sh_scoreboard.lua:34: ')' expected near '.'
  1. unknown - lua/autorun/sh_scoreboard.lua:0



[LUA]
Columns[2] = {
name = “Team”,
command = function( self )
return self.Player.DarkRPVars and self.Player.DarkRPVars.job or team.GetName( self.Player:Team() )
end
}

[/LUA]

Is probably what you want. Although I don’t know why you would need “self.Player.DarkRPVars and self.Player.DarkRPVars.job”.

[LUA] return team.GetName( self.Player:Team() ) or “Unknown” [/LUA]

This should work just as well, but I don’t know anything about DarkRP so who knows.

He could just simply do
[lua]
Columns[2] = {
name=“Team”,
command=function(self, arg) return tostring(team.GetName(arg:Team()))
end}
[/lua]