Solved Function not Running

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

Marto_0

Member
Jul 14, 2017
15
1
3
20
So im trying To make a shop where u can buy "AutoMiners". But somehow its not calling/running the function.
upload_2017-8-16_16-34-21.png

upload_2017-8-16_16-34-44.png

There are none errors


Thanks for reading.

EDIT:
So ive done some more testing. After i removed the L: string at the function and the Gui. It works. But the chest gets lure "<none>" So if there is any way to fix this that whould be awesome\



EDIT2:
I managed to fix it by putting " " around Coal miner
 
Last edited:
Just to ask, what are those options formatting to? In case you want to format all remaining blank slots to air or something else, you can make a simple function instead:
code_language.skript:
function lockSlot(player: Player, item: Item):
loop integers from 0 to 53 times: #You can switch with an expression to get the size of an inventory if you have Skellet
    if {_p} has gui slot loop-number: #It checks if the slots has a gui setted in it.
        make gui slot loop-number of {_p} with {_item} #It will set a gui with no actions, you can use 'air' so the player can't place items.
 
Just to ask, what are those options formatting to? In case you want to format all remaining blank slots to air or something else, you can make a simple function instead:
code_language.skript:
function lockSlot(player: Player, item: Item):
loop integers from 0 to 53 times: #You can switch with an expression to get the size of an inventory if you have Skellet
    if {_p} has gui slot loop-number: #It checks if the slots has a gui setted in it.
        make gui slot loop-number of {_p} with {_item} #It will set a gui with no actions, you can use 'air' so the player can't place items.
Tysm This saved a lot of lines and time.
 
Status
Not open for further replies.