• Need Help with Converting from a string to a non-string in tables
    1 replies, posted
Okay so in this example I'm trying to create tables inside of another table. I have to be able to get the name of the table that is to be created with a variable however when I want to put it into table.insert it interprets the variable name literally. As in if I do: table.insert(GROUP.grp.members) where grp is the variable of the actual table name. I am a noob so I have not a clue in what to do in this problem. [CODE]function ply:InGroup() for id, group in pairs( GROUPS ) do if table.HasValue( group.members , self:SteamID() ) then return group --and true end return false end end function deleteGroup( ply , grp ) if ply:IsValid then if !ply:InGroup = false then --We know they're in a group so we can set grp to be the group name and then retrieve it in the table location local grp = ply:InGroup if table.HasValue( effusion.GROUPS.grp.creator ) = { ply:SteamID() , ply:Nick() } then table.Empty( effusion.GROUPS.grp ) effusion.GROUPS.grp = nil return true end return false end return false end return false end[/CODE]
Half of your code doesn't make sense and thus won't work. To be specific: [t]http://puu.sh/qjw0Q/9d547ce7f7.png[/t]
Sorry, you need to Log In to post a reply to this thread.