- Initiateur de la discussion
T
Tristanbzh37
Geek suprême
- Messages
- 103
- Score réaction
- 3
- Points
- 110
Bonjour j'ai une erreur et cela me donne ceci :
________________________________________________________________
[ERROR] addons/kcs/lua/kcs/sv_init.lua:76: attempt to call method 'IsAdmin' (a nil value)
1. unknown - addons/kcs/lua/kcs/sv_init.lua:76
2. unknown - lua/includes/modules/concommand.lua:54
________________________________________________________________
Les lignes de codes :
_________________________________________________
74 function SaveKCS( ply, cmd, args )
75
76 if ( !ply:IsAdmin() or !ply:IsSuperAdmin() ) then return end
77
78 ply:StripWeapon( "admin_multitool" )
79 SaveMapKCS()
80
81 end
_________________________________________________
_________________________________________________
52 function SaveMapKCS()
53
54 if not file.Exists( KCS.SavePath, "DATA" ) then file.CreateDir( KCS.SavePath ) end
55 MsgN( "Saving map config data..." )
56
57 local enttbl = {
58 keycard_register = {}
59 }
60
61 for k,v in pairs( enttbl ) do
62 for c,d in pairs( ents.GetAll() ) do
63 if d.Restricted then
64 table.insert( enttbl[k], { d:EntIndex(), d.Level } )
65 end
66 end
67 end
68
69
70 file.Write( string.lower( KCS.SavePath ) .. "/" .. string.lower( game.GetMap() ) .. "_json.txt",
71 util.TableToJSON( enttbl ) )
72
73 end
_________________________________________________
Merci de m'expliquer se que tous sa signifie pour que je puisse continuer mon travail !
Merci ! Cordialement N.I.H ! (Tristan !)
________________________________________________________________
[ERROR] addons/kcs/lua/kcs/sv_init.lua:76: attempt to call method 'IsAdmin' (a nil value)
1. unknown - addons/kcs/lua/kcs/sv_init.lua:76
2. unknown - lua/includes/modules/concommand.lua:54
________________________________________________________________
Les lignes de codes :
_________________________________________________
74 function SaveKCS( ply, cmd, args )
75
76 if ( !ply:IsAdmin() or !ply:IsSuperAdmin() ) then return end
77
78 ply:StripWeapon( "admin_multitool" )
79 SaveMapKCS()
80
81 end
_________________________________________________
_________________________________________________
52 function SaveMapKCS()
53
54 if not file.Exists( KCS.SavePath, "DATA" ) then file.CreateDir( KCS.SavePath ) end
55 MsgN( "Saving map config data..." )
56
57 local enttbl = {
58 keycard_register = {}
59 }
60
61 for k,v in pairs( enttbl ) do
62 for c,d in pairs( ents.GetAll() ) do
63 if d.Restricted then
64 table.insert( enttbl[k], { d:EntIndex(), d.Level } )
65 end
66 end
67 end
68
69
70 file.Write( string.lower( KCS.SavePath ) .. "/" .. string.lower( game.GetMap() ) .. "_json.txt",
71 util.TableToJSON( enttbl ) )
72
73 end
_________________________________________________
Merci de m'expliquer se que tous sa signifie pour que je puisse continuer mon travail !
Merci ! Cordialement N.I.H ! (Tristan !)