i keep getting this on my menu:
1
LUA ERROR: attempt to call a table value
1
LUA ERROR: attempt to call a nil value
edited 1×, last 31.10.09 03:11:30 am
Scripts
Lua Scripts/Questions/HelpLUA ERROR: attempt to call a table value
LUA ERROR: attempt to call a nil value
a = {0,2,4}
b = a + 4
a = b + 3
b = nil a = b/2
somthing = {12,"sv_name",88}
if (value == nil) then
	print('value doesn't exist!')
end
if (value ~= nil) then
	print('value exist!')
end
for i=1,36,1 do 	if (player(i,"exists")) then 		totalplayers = totalplayers+1 		if player(i,"team") = 1 then 			team1 = team1+1 		end 		if player(i,"team") = 2 then 			team2 = team2+2 		end 	end end
addhook("team","my_class")
function my_class(id)
	if player(id,"team")==2 then
		<your script goes here>
	end
end
addhook("team","teams")
function teams(p,t)
	local i
	local team_t = 0
	local team_ct = 0
	local team_spec = 0
	for i = 1,32 do
		 if (player(i,"exists")) then
			if player(i,"team") == 1 then
				 team_t = team_t + 1
			end
			if player(i,"team") == 2 then
				 team_ct = team_ct + 1
			end
			if player(i,"team") == 0 then
				 team_spec = team_spec + 1
			end
		end
	end
	msg('=========================')
	msg('Terrorists:'.. team_t)
	msg('Counter-Terrorists:'.. team_ct)
	msg('Spectators:'.. team_spec)
	msg('Total Players:'.. team_ct + team_t + team_spec)
end