Solved GUI Function Issue

  • 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!

Status
Not open for further replies.

wesnoah3

Active Member
Aug 18, 2017
73
3
8
Hey Everyone, I'm having an issue trying to move my GUI from a command to a function.
Here is the code for the commands I created, which worked great: https://pastebin.com/beQLntQK
And here is the code for the function I created, which opened the chest but the command wouldn't run, the diamond was just unstealable: https://pastebin.com/twzPiTHn
I am running the latest version of Skript, SkQuery, TuSKe, and skRayFall.
Any help is much appreciated!
 
You shouldn't use skQuery for GUIs. If you're using TuSKe, use its GUI Manager (it is almost identical to skQuery's format slot, at least the simple one)
I re-formatted the code to TuSKe's GUI Manager and deleted skQuery: https://pastebin.com/4wYupzB6
I still am having the same issue.
[doublepost=1546646579,1546552808][/doublepost]Recently noticed this error appearing in the console when clicking on the item: https://pastebin.com/SbafpBfk . Can anyone make any sense of it?
 
The stack trace error im not sure, looks like something is interfering with luck perms

As for the gui issue.... i have come across this as well and for some SILLY reason, with tuske/guis and functions, try replacing {_p} with player... i know its ass backwards and totally not supposed to work, but for some reason it does
 
The stack trace error im not sure, looks like something is interfering with luck perms

As for the gui issue.... i have come across this as well and for some SILLY reason, with tuske/guis and functions, try replacing {_p} with player... i know its ass backwards and totally not supposed to work, but for some reason it does
Thanks for the reply but its just saying there's no player in the a function event, even after three different applications of what you said: https://pastebin.com/aEHRd5xt
[doublepost=1546652261,1546650209][/doublepost]Until this bug is hopefully sorted out, I made a sorta klugey fix: https://pastebin.com/hhy7tcfq
 
I just used your original code
code_language.skript:
function testCmd1(p: player):
    open virtual chest with 2 rows named "&4Test" to {_p}
    format gui slot 0 of {_p} with diamond named "Test Cmd" to run {_p} command "/testcmd12"

command /testcmd12:
    trigger:
        wait 1 tick
        message "Test Worked"

command /test:
    trigger:
        testCmd1(player)
Im running the following:
Skript 2.3 (final stable release)
Tuske 1.8.3Pikachu patch 3

Works perfectly fine.
GUI popped up, I clicked the diamond, and the message "Test Worked" shows up in my chat.

Screen Shot 2019-01-04 at 5.50.45 pm.png
 
Huh, decided to go through and remove plugins that may be interfering and it turned out LuckPerms was causing the issue as its working perfectly now. I believe LuckPerms would just require a line for permission: "permission". Anyways, thanks for the help!
 
Huh, decided to go through and remove plugins that may be interfering and it turned out LuckPerms was causing the issue as its working perfectly now. I believe LuckPerms would just require a line for permission: "permission". Anyways, thanks for the help!
That is weird it interferes.
But you're welcome
 
Status
Not open for further replies.