[?] Logic Flaw in Plugin that I cannot find.

Discussion in 'Plugin Development' started by caldabeast, Apr 9, 2012.

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

    caldabeast

    In the below code, there is some sort of logic flaw in my permissions. for the /givebadge command and the /takebadges command, if the player has no permissions, it works properly, but if a player has any of the permissions, no matter which one it is, it only allows the player to give the top badges on the list, the Boulder Badge. If somebody could take a look at my code and tell me where my error is, I would really appreciate it.

    (Code too long to add to post) http://pastie.org/3758149
     
  2. Offline

    Njol

    You should really use methods (and arrays/loops) in your code, as most of the code is repetitive.
    I know that this is not the solution for you problem, but if your code looks better you are more likely to find the mistake.

    BTW: You never have to copy code, there's always another way to do it.
     
  3. Offline

    caldabeast

    After I completed it, I realized that. I had a feeling I was going to have to rewrite it to squash the bug.
     
Thread Status:
Not open for further replies.

Share This Page