Eviles 179 Report post Posted August 5, 2016 (edited) Hello guys. Currently i'm working on my first serialize project and seems all fine at the moment, but i got a mistake with setting "state" to all members in a guild. The point is load a table get a exact value of a table and then add a state, i did it but it didn't worked properly.. the glow keep blinking and bonus doesn't refresh. function GuildBuff(ignore,role) local GuildID = GetChaGuildID(role) if(file_exists(Alliance.Path..""..GuildID..".txt") == true) then -- Check if database exists local Get = table.load(Alliance.Path..""..GuildID..".txt","r") -- load database local Alliance_Lv = Get.Level -- get level on the table if Alliance_Lv == 1 then local statelv = 1 local statetime = 3600 AddState( role , role , STATE_GBUFF , statelv , statetime ) else local state1 = GetChaStateLv(role, STATE_GBUFF) if state1 ~= 0 then RemoveState(role, STATE_GBUFF) end end end end Hook:AddPostHook("custom_cha_timer",GuildBuff) Isn't working fine because i used (role,role) to set the state for all members? What should i use? Edited August 5, 2016 by Satan Quote Share this post Link to post Share on other sites
InuYasha 4 Report post Posted August 6, 2016 but what about this custom_cha_timer? how to add this custom cha timer? Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted August 6, 2016 1 hour ago, InuYasha said: but what about this custom_cha_timer? how to add this custom cha timer? This is a function. Quote Share this post Link to post Share on other sites
InuYasha 4 Report post Posted August 6, 2016 52 minutes ago, Dimitrov said: This is a function. can u explain Dr.Dimitrov? Quote Share this post Link to post Share on other sites
Eviles 179 Report post Posted August 6, 2016 2 hours ago, InuYasha said: but what about this custom_cha_timer? how to add this custom cha timer? Feel fre to ask at question section like i did Quote Share this post Link to post Share on other sites
Vasil 71 Report post Posted August 6, 2016 29 minutes ago, InuYasha said: can u explain Dr.Dimitrov? spko files>calculate>functions.lua alt+f custom_cha_timer Quote Share this post Link to post Share on other sites
InuYasha 4 Report post Posted August 6, 2016 2 hours ago, Satan said: Feel fre to ask at question section like i did why u don't explain Quote Share this post Link to post Share on other sites