Lua error! D:

I’m having some trouble with player models for a pointshop
I’m getting an error in my console

[ERROR] addons/arkham knight/lua/autorun/akak.lua:2: ')' expected (to close '(' at line 1) near 'end'
  1. unknown - addons/arkham knight/lua/autorun/akak.lua:0

this is the lua file

if {SERVER} then player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl") AddCSLuaFile( "akak.lua"
list.set ( "PlayerOptionsModel", "Arkham Knight", "models/player/bobert/AKAK.mdl")?

Remove the brackets around SERVER. Also, close your parenthesis around the AddCSLuaFile

There’s more than one problem with that code. And there’s no point in AddCSLuaFile()'ing autorun files, it’s automatic.

if SERVER then
    player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl")
list.set ( "PlayerOptionsModel", "Arkham Knight", "models/player/bobert/AKAK.mdl")

For like FIVE YEARS NOW the list.Set part is obsolete. FIVE. YEARS.

Here’s the new best way:

player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl")

Also you might want to lowercase that model name, so it becomes

player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/akak.mdl")

[editline]6th August 2015[/editline]

YES, you DO NOT need the if SERVER part anymore.

[editline]6th August 2015[/editline]

That must be shared still.

Thank you everyone for all the help! :smiley: