Alex1002 Posted July 22, 2016 Share Posted July 22, 2016 (edited) 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 July 22, 2016 by Guest Link to comment
Alex1002 Posted July 22, 2016 Author Share Posted July 22, 2016 Changed local teams = getTeamFromName(getPlayerTeam(client)) To local teams = getTeamName(getPlayerTeam(client)) Now it Works. M.f.G Alex.W Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now