Jump to content

attempt to Index field "?" (a nil value)


Alex1002

Recommended Posts

Hallo,

How we can fix my problem with this table¿¿¿

  
createTeam ("teamOne", 235, 225, 0) 
createTeam ("teamTwo", 235, 225, 0) 
  
teamConfig = { 
  ["teamOne"] = { 
    ["spawns"] = { 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246} 
    }, 
    ["skins"] = {93, 111, 112, 113, 113, 124, 125, 126, 127, 211, 237, 272}, 
    ["dim"] = {15}, 
  }, 
  ["teamTwo"] = { 
    ["spawns"] = { 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246}, 
      {-2833.5, -1950.4000244141, 50, 246} 
    }, 
    ["skins"] = {49, 55, 56, 57, 59, 60, 117, 118, 120, 122, 123, 169, 186, 210, 224, 225, 226, 227, 228, 229, 263, 294}, 
    ["dim"] = {15}, 
  }, 
} 
  
function teamSettings () 
  local teams = getTeamFromName(getPlayerTeam(client)) <-- here  
  local spawn = teamConfig[teams]["spawns"][math.random(1, #teamConfig[teams]["spawns"])] <-- here 
  local skin = teamConfig[teams]["skins"][math.random(1, #teamConfig[teams]["skins"])] 
  local dimen = teamConfig[teams]["dim"] 
  spawnPlayer(client, spawn[1], spawn[2], spawn[3], spawn[4]) 
  setElementModel(client, skin) 
  setElementDimension(client, dimen[1]) 
  fadeCamera (client, true) 
  setCameraTarget (client, client) 
  showCursor(client, false) 
  teamMemberGroupTimer () 
end 

he says, "attempt to Index field "?" (a nil value)"

M.f.G

Alex.W

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...