• Shendow Whitelist Factions
    5 replies, posted
Shendow the creator of the addon has listed his addon as unsupported due to health reasons so I cant get help from him to figure out what im doing with this addon exactly. I dont mean to leak his addon but this is from his faction config file and I just want to get help on how to restrict it when comparing values. CanJoin = function(self, ply) return self:IsUserGroup("superadmin") end This little snippet works and I have spent a few hours figuring out how to restrict his faction system. I learnt he made the config file kinda like a boolean so its yes or no, i cant have "then" or "if" in it and its really frustrating me. Because I want it to be able to appear if your a certain level. But it works like a boolean and ply just breaks the script so im not sure. CanJoin = function(self, ply) return self:GetLVL() < 29 end addons/sh_whitelist/lua/whitelist_factions.lua:94: attempt to call method 'GetLVL' (a nil value) < The error I get
Have you tried the parameter ply that gets passed in when something calls it? like return ply:GetLVL() < 29? probably a meta function on the player object instead of the self object
Considering self:IsUserGroup("admin") worked we can safely assume self is also a player object(?) Is GetLVL even a valid function? Where did you find this? is it a player meta function?
Yeah it is @Invule GetLVL is a meta function
Make debug: print(self,ply)
Player [8][ORONG] nil This is what it printed back, I did a name print before this. Does this say anything different?
Sorry, you need to Log In to post a reply to this thread.