I'm having some trouble with player models for a pointshop
I'm getting an error in my console
[CODE]
[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
[/CODE]
this is the lua file
[CODE]if {SERVER} then player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl") AddCSLuaFile( "akak.lua"
end
list.set ( "PlayerOptionsModel", "Arkham Knight", "models/player/bobert/AKAK.mdl")?[/CODE]
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.
[code]
if SERVER then
player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl")
end
list.set ( "PlayerOptionsModel", "Arkham Knight", "models/player/bobert/AKAK.mdl")
[/code]
[QUOTE=mijyuoon;48391817]There's more than one problem with that code. And there's no point in AddCSLuaFile()'ing autorun files, it's automatic.
[code]
if SERVER then
player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl")
end
list.set ( "PlayerOptionsModel", "Arkham Knight", "models/player/bobert/AKAK.mdl")
[/code][/QUOTE]
For like FIVE YEARS NOW the list.Set part is obsolete. [b]FIVE. YEARS.[/b]
Here's the new best way:
[code]
player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/AKAK.mdl")
[/code]
Also you might want to lowercase that model name, so it becomes
[code]
player_manager.AddValidModel( "Arkham Knight", "models/player/bobert/akak.mdl")
[/code]
[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! :D
Sorry, you need to Log In to post a reply to this thread.