Just to go a little farther and explain to you WHY it didn't work the way you had it:
When you want to set the contents of a table in lua you put it in curly brackets.
Example:
test.table = {"hello"}
If I were to write another line defining something completely different in test.table; for example:
test.table = {
"something else"}
this completely overwrites whatever was already in test.table with the new value which is "something else" in this case.
Your example basically overwrote itself 3 times until:
ITEM.AllowedUserGroups = {
"hos" }
was the last thing you set that table to. Everything before it was erased.
If you want to add multiple items to a table there are two ways to do it.
You can separate each item with commas when you originally define the table, which is what Megiddo did in his example:
ITEM.AllowedUserGroups = {
"superadmin",
"diamond",
"admin",
"hos" }
Or, alternatively, you can append new data to an already existing table.
To append new data to an existing table, you would use the lua function 'table.insert'
ITEM.AllowedUserGroups = { }
--This creates the table with nothing in it. Items will be added below.table.insert( ITEM.AllowedUserGroups,
"superadmin" )table.insert( ITEM.AllowedUserGroups,
"diamond" )table.insert( ITEM.AllowedUserGroups,
"admin" )table.insert( ITEM.AllowedUserGroups,
"hos" )The reason diamond worked even though it appears to have been overwritten is because I would be willing to bet that your 'hos' group inherits from the diamond group.
I hope this has been helpful and not confusing.