I get function error. Please help me.

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

    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.

CoolPeople

Member
Jan 26, 2017
27
0
0
Code:
code_language.skript:
function setItemPrice(p: player, s: int):
    set yaml value "Market.Player.%{_p}%.Pricing" from file "plugins/M2Pazar/veritabanı.yml" to {_s}

function pricingItem(p: player) :: player:
    IF {_p} is op:
        loop 18 times:
            create a gui slot (loop-number - 1) of {_p} with barrier named "&b%loop-number - 1%" to close then run function setItemPrice({_p}, (loop-number - 1))
    ELSE:
        loop 36 times:
            create a gui slot (loop-number - 1) of {_p} with barrier named "&b%loop-number - 1%" to close then run function setItemPrice({_p}, (loop-number - 1))
    return {_p}

on rightclick on ender portal frame:
    create a gui slot 12 of player with nametag named "&bÜrün Fiyatlandır" to close then run function pricingItem(player)

Error:
code_language.skript:
[Server thread/ERROR]: The returned value of the function 'pricingItem', player, is not a world. (pazar.sk, line 14: create a gui slot 12 of player with nametag named "&bÜrün Fiyatlandır" to close then run function pricingItem(player)')
 
Last edited:
It could be because you are getting a return value when no return value is accepted
What's the point of returning {_p}, why don't you just have no return?
 
If you look at the code I want to edit the nested function, what do I need to do?
[doublepost=1499852619,1499851807][/doublepost]I fix the problem, nametag was wrong.
 
Status
Not open for further replies.