I need help with lists

Hello,
When people join my server, they will see the output of this script:
[lua]Visited = {}

function ShowRules()
if Player:Nick = list.Get(“Visited”)
return end
else
local DermaPanel = vgui.Create(“DFrame”)
DermaPanel:SetSize( 336, 215 )
DermaPanel:SetTitle(“Welcome to Hellspawn’s Fun Server!”)
DermaPanel:SetVisible(true)
DermaPanel:SetDraggable(false)
DermaPanel:SetBackgroundBlur(true)
DermaPanel:ShowCloseButton(false)
DermaPanel:MakePopup()
DermaPanel:Center()

local DermaLabel = vgui.Create("DLabel")
DermaLabel:SetText( [[
THE RULES
  
1. Dont spam or build Contraptions that lag the Server.
  
2. Play nice, dont touch other Players Stuff without asking them.
  
3. Respect the Admins and they will respect you.
  
4. No random Deathmatch!!!
                      
5. Type "Accepted" in the box below and click the OK button.
]] )
DermaLabel:SetParent(DermaPanel)
DermaLabel:SizeToContents()
DermaLabel:SetPos(10, 25)
  
local DermaLabel1 = vgui.Create("DLabel")
DermaLabel1:SetText("Read the rules first!")
DermaLabel1:SetParent(DermaPanel)
DermaLabel1:SizeToContents()
DermaLabel1:SetPos(230,185)
DermaLabel1:SetColor(Color(255,0,0))
DermaLabel1:SetVisible(false)
  
local DermaText = vgui.Create("TextEntry")
DermaText:SetParent(DermaPanel)
DermaText:SetSize(70,25)
DermaText:SetPos(98,180)
  
local DermaButton = vgui.Create("DButton")
DermaButton:SetParent(DermaPanel)
DermaButton:SetSize(50,25)
DermaButton:SetPos(173,180)
DermaButton:SetText("OK")
DermaButton.DoClick = function()
    if DermaText:GetValue() == ("Accepted") then
        DermaPanel:Close()
        LocalPlayer():ConCommand("say /me accepted the rules.")
        list.Add("Visited",Player:Nick())
    else
        DermaLabel1:SetVisible(true)
    end
end

end

concommand.Add(“rules”, ShowRules)
– hook.Add(HOOK_TYPE , HOOK_UNIQUEIDENTIFIER, function
hook.Add(“InitPostEntity” , “You’re all retarded and giving out incorrect advice” , ShowRules)[/lua]

The problem: when the script runs, i get this error: “[RunString:6] function arguments expected near ‘=’”

the error first appeared after i added the list system…

[lua]
print( ply:Nick ) – this is missing function arguments
print( ply:Nick() ) – this is vallid

– change line 4 to

if Player:Nick() = list.Get(“Visited”) then

[/lua]

Also use == for comparison, = is for setting the value.

To be honest, lists are stupid, don’t use them.

yea use tables instaed … :smiley: