Solved Kit List Permission check assistance

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

And what, exactly is the issue?
The problem lies in the permission check, I want each page to display 6 lines of kits. Yet, when a player lacks a permission for a kit, it doesn't show it (which is intended) displays as <none> but it doesn't show the full 6 lines.

Note: ONLY TEST1 HAS A PERM SET, ALL OTHERS DO NOT.

When opped:
1714958054608.png

When deopped w permission:
1714958029459.png

When deopped w/o permission:
1714957987314.png

Notice the <none>? I want it to be hidden AND show test7 on this page
 
I believe, then, that the problem lies with your variables, with stuff like {_k} and {_z} (I recommend you change those names so you know what they're doing btw, for example in normal programming a "ball width" variable wouldn't be called bw, it'd be BALLWIDTH or BALL_WIDTH (all caps in programming var names is common practice but not required)) As far as I can tell with your math and the way you set them, it checks for all values between test(1-6), but then you don't return test1 if they don't have the permission, so it ends up only returning 2-6 and is forced to display none for the last one.

TLDR; maybe change variable names, your variable setting seems to be causing issues
 
I believe, then, that the problem lies with your variables, with stuff like {_k} and {_z} (I recommend you change those names so you know what they're doing btw, for example in normal programming a "ball width" variable wouldn't be called bw, it'd be BALLWIDTH or BALL_WIDTH (all caps in programming var names is common practice but not required)) As far as I can tell with your math and the way you set them, it checks for all values between test(1-6), but then you don't return test1 if they don't have the permission, so it ends up only returning 2-6 and is forced to display none for the last one.

TLDR; maybe change variable names, your variable setting seems to be causing issues
It works fine when I remove the permission check, I just need the perm check fixed :emoji_stuck_out_tongue:
test1 has a permission assigned, and when a player lacks the permission, I want the kit to be invisible.
Unfortunately, instead, it shows up as <none>.
The second issue is that once it IS removed, only 5 list items are shown, I want the list to continue on, as if the kit didn't exist.