Solved Repeating Task Sometimes Breaks

Discussion in 'Plugin Development' started by plisov, Jan 27, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    Drkmaster83

    At the current moment, he's using the configs for each player respectively as the storage base (perhaps a latency increase, but if he wants to learn HashMaps, fine with me).

    Your timers are local, your amount value is global. Perhaps this will help you see the difference (I added some comments to clarify, it's the code you posted vs. what I modified in my IDE).

    @plisov It could be worth it, if the server seems laggy or the plugin seems slow, to add a HashMap (as @timtower mentioned) caching system (loads everything from the config that it needs and saves it when it doesn't need it, makes the response time faster when grabbing/changing times for players).
     
  2. Offline

    plisov

    Thank you so much. I was trying this however I kept on getting errors that said amount wasnt initialized anywhere. Therefore I couldn't see if that would fix my problem. I'll see if this solves any bugs and get back to you. So far it looks promising.

    Edit: The problem still seems to exists. If you're not stuck I certainly am :p
    https://gyazo.com/016e2cd1af9da9e958c50c932b4e44ef

    Edit 2: I deleted the config files and everything seems to work fine at the moment. I'll let you know if anything goes wrong.
     
    Last edited: Feb 1, 2017
  3. Offline

    Drkmaster83

    Any breaks? If so, post it! If not, I'd appreciate if you set the thread prefix to resolved.
     
    Zombie_Striker likes this.
  4. Offline

    plisov

    So far so good! Thank you everyone for helping me. I'll be posting this as solved. If there are problems in the future I will let you guys know. :)
     
Thread Status:
Not open for further replies.

Share This Page