Erreur avec un script lua help please

  • Initiateur de la discussion BCZ Gaming
  • Date de début
  • Initiateur de la discussion
BCZ Gaming

BCZ Gaming

Psychopathe
Messages
1 301
Score réaction
129
Points
275
Hey, ça va?
Je me poser une question, j'ai récemment fait l’acquisition des script de cette page mtxserv : StackPath

Petit problème, le "basewars_pointsystem" m'indique l'erreur suivante quand je me connecte au serveur pouvez-vous m'aider? Merci
Code:
[ERROR] addons/basewars_pointsystem/lua/autorun/server/sv_competence.lua:24: attempt to index global 'self' (a nil value) 1. fn - addons/basewars_pointsystem/lua/autorun/server/sv_competence.lua:24 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109
Code du fichier en question :

Java:
util.AddNetworkString("BW::PointOpenMenu")
util.AddNetworkString("BW::BuyCompetence")
hook.Add("InitPostEntity","InitPostEntity::Create::FileBW",function() if not file.Exists("data_bw_comp","DATA") then file.CreateDir("data_bw_comp") end
end)
hook.Add("PlayerInitialSpawn","PlayerInitialSpawn::SetDataFolderBW",function(ply) if not file.Exists("data_bw_comp/" .. ply:SteamID64() .. ".txt","DATA") then file.Write("data_bw_comp/" .. ply:SteamID64() .. ".txt", util.TableToJSON({point = 0, id = {}})) else local tbl = util.JSONToTable(file.Read("data_bw_comp/" .. self:SteamID64() .. ".txt","DATA")) for _,v in pairs(tbl.id) do BWCompetence.Config.List[b].funct(ply) end end
end)
net.Receive("BW::BuyCompetence",function(_,ply) local id = net.ReadFloat() if !istable(BWCompetence.Config.List[id]) then return end if BWCompetence.Config.List[id].point <= ply:GetPointPrestige() then ply:AddTableId(id) ply:AddTablePoint(-BWCompetence.Config.List[id].point) BWCompetence.Config.List[id].funct(ply) BaseWars.Util_Player:NotificationAll(ply:Name() .. " vient d'acheter une compétence !", Color(0,255,0)) else BaseWars.Util_Player:NotificationAll(ply:Name() .. " n'a pas assez de point !", Color(0,255,0)) end
end)

Merki bocou :)
 
Proxilys

Proxilys

Geek
Messages
45
Score réaction
7
Points
65
Je ne vois pas l'erreur dans ton script
 
  • J'aime
Réactions: proxitest
thepsyca

thepsyca

Psychopathe
Messages
2 164
Score réaction
648
Points
365
Java:
util.AddNetworkString("BW::PointOpenMenu")
util.AddNetworkString("BW::BuyCompetence")
hook.Add("InitPostEntity","InitPostEntity::Create::FileBW",function() if not file.Exists("data_bw_comp","DATA") then file.CreateDir("data_bw_comp") end
end)
hook.Add("PlayerInitialSpawn","PlayerInitialSpawn::SetDataFolderBW",function(ply) if not file.Exists("data_bw_comp/" .. ply:SteamID64() .. ".txt","DATA") then file.Write("data_bw_comp/" .. ply:SteamID64() .. ".txt", util.TableToJSON({point = 0, id = {}})) else local tbl = util.JSONToTable(file.Read("data_bw_comp/" .. ply:SteamID64() .. ".txt","DATA")) for _,v in pairs(tbl.id) do BWCompetence.Config.List[b].funct(ply) end end
end)
net.Receive("BW::BuyCompetence",function(_,ply) local id = net.ReadFloat() if !istable(BWCompetence.Config.List[id]) then return end if BWCompetence.Config.List[id].point <= ply:GetPointPrestige() then ply:AddTableId(id) ply:AddTablePoint(-BWCompetence.Config.List[id].point) BWCompetence.Config.List[id].funct(ply) BaseWars.Util_Player:NotificationAll(ply:Name() .. " vient d'acheter une compétence !", Color(0,255,0)) else BaseWars.Util_Player:NotificationAll(ply:Name() .. " n'a pas assez de point !", Color(0,255,0)) end
end)
 
  • J'aime
Réactions: BCZ Gaming
  • Initiateur de la discussion
BCZ Gaming

BCZ Gaming

Psychopathe
Messages
1 301
Score réaction
129
Points
275
thepsyca à dit:
Java:
util.AddNetworkString("BW::PointOpenMenu")
util.AddNetworkString("BW::BuyCompetence")
hook.Add("InitPostEntity","InitPostEntity::Create::FileBW",function() if not file.Exists("data_bw_comp","DATA") then file.CreateDir("data_bw_comp") end
end)
hook.Add("PlayerInitialSpawn","PlayerInitialSpawn::SetDataFolderBW",function(ply) if not file.Exists("data_bw_comp/" .. ply:SteamID64() .. ".txt","DATA") then file.Write("data_bw_comp/" .. ply:SteamID64() .. ".txt", util.TableToJSON({point = 0, id = {}})) else local tbl = util.JSONToTable(file.Read("data_bw_comp/" .. ply:SteamID64() .. ".txt","DATA")) for _,v in pairs(tbl.id) do BWCompetence.Config.List[b].funct(ply) end end
end)
net.Receive("BW::BuyCompetence",function(_,ply) local id = net.ReadFloat() if !istable(BWCompetence.Config.List[id]) then return end if BWCompetence.Config.List[id].point <= ply:GetPointPrestige() then ply:AddTableId(id) ply:AddTablePoint(-BWCompetence.Config.List[id].point) BWCompetence.Config.List[id].funct(ply) BaseWars.Util_Player:NotificationAll(ply:Name() .. " vient d'acheter une compétence !", Color(0,255,0)) else BaseWars.Util_Player:NotificationAll(ply:Name() .. " n'a pas assez de point !", Color(0,255,0)) end
end)
Nickel merci mec
 
  • Initiateur de la discussion
BCZ Gaming

BCZ Gaming

Psychopathe
Messages
1 301
Score réaction
129
Points
275
J'ai un autre problème le systeme pour prestiges une entités ne fonction pas, mais aucun erreur indiqué pouvez-vous m'aidez?
 
Discord d'entraide
Rejoignz-nous sur Discord