[ERROR] unexpected symbol near ')'


function nameToEnt( name )
        name = string.lower(name)
        for k,v in pairs(player.GetAll()) do
                if string.sub(string.lower(v:Nick()), 0, string.len(name)) == name then
                        return v
                end
        end
end
 
concommand.Add("CarMenu", function( ply, cmd, args )
        for i=1, 10 do
        id = nameToEnt(args[1])
        net.Start( "menu" )
                net.WriteEntity( id )
				
                
        net.SendToServer()
end)



You didn’t end your for-loop.

[lua]function nameToEnt( name )
name = string.lower(name)
for k,v in pairs(player.GetAll()) do
if string.sub(string.lower(v:Nick()), 0, string.len(name)) == name then
return v;
end
end
end

concommand.Add(“CarMenu”, function( ply, cmd, args )
for i=1, 10 do
id = nameToEnt(args[1])
net.Start( “menu” )
net.WriteEntity( id )
net.SendToServer()
end
end );[/lua]

thanks