function error. Sorry Im new with funtions

  • 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.
Feb 24, 2017
191
7
0
foroendertheth.foroactivo.com
code_language.skript:
function vida(p: player):
    open chest with 1 rows named "&4Vida" to the {_p}
    format slot 1 of the {_p} with a wool named "Subir Vida" with lore "&asube +20||&9%{vidacosto.%{_p}%}%" to run [vida1(player)]
function vida1(p: player):
    if {dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%:
        subtract %{vidacosto.%{_p}%}% form the player
        add 1000 to {vidacosto.%{_p}%}
        add 20 to {vida.%{_p}%}
    else:
        send "&cNo tienes suficiente dinero" to {_p}
        wait 2 second
        send "&9Tu dinero %{dinero.%{_p}%}%" to {_p}
[21:20:54 ERROR]: There's no player in a function event (funtions.sk, line 12: format slot 1 of the player with a wool named "Subir Vida" with lore "&asube +20||&9%{vidacosto.%{_p}%}%" to run [vida1(player)]')
[21:20:54 ERROR]: can't understand this condition: '{dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%' (funtions.sk, line 14: if {dinero.%{_p}%} is more than or equal to %{vidacosto.%{_p}%}%:')
[21:20:54 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (funtions.sk, line 18: else:')
[21:20:54 INFO]: [Skript] Encountered 4 errors while reloading funtions.sk!
 
Status
Not open for further replies.