#Errors are not making sense

1 messages · Page 1 of 1 (latest)

graceful zephyr
#

Code:

command /lifesteal [<text>] [<player>] [<count:integer>]:
    aliases: /ls
    trigger:
        if arg-1 is not set:
            lshelp(player)
        else:
            else if arg-1 is "help" or "sos" or "?":
                lshelp(player)
            else if arg-1 is "check" or "health" or "hearts" or "heart":
                send "" to player
                send "{@Prefix} &c%arg-1% &7has &4%arg-2's max health% ❤" to Player
                send "" to player
            else if arg-1 is "pay" or "give" or "givehearts":
                set {_count} to min(max({_count}, 1), {@MaxHealth})
                if player's max health is more than 1:
                    if player's max health is more than arg-3:
                        subtract arg-3 from player's max health
                        add arg-3 to arg-1's max health
                        send "" to arg-3
                        send "{@Prefix} &7You have received &4%arg-2% ❤ &7from &b%player%&c!" to arg-3
                        send "" to arg-3
                        send "" to player
                        send "{@Prefix} &7You have given &4%arg-1% ❤ &7to &b%arg-2%&7!" to player
                        send "" to player
            else if arg-1 is "credits" or "tripp":
                send " " to Player
                send "{@Prefix} &ftripp##0001 made this skript."
                send "&3&lCLICK &8- <tooltip:&6&lSPIGOT PAGE><link:https://SPIGOTLINK.com>&a&lSPIGOT <tooltip:&6&lsk UNITY PAGE><link:https://SKUNITYLINK.com>&a&lsk UNITY <tooltip:&b&lSUPPORT DISCORD><link:https://SUPPORT DISCORD.com>&b&lSUPPORT DISCORD" to player
                send " " to player
            else:
                lshelp(player)
                else:
                    send "{@Prefix} &4Error: &cYou have &41 ❤&7." to player
                    else:
                        send "{@Prefix} &7You do not have enough health for that." to player

Errors:

Line 86: Can't compare an integer with a text (line 86: else if arg-1 is "help" or "sos" or "?":')

Line 88: Can't compare an integer with a text (line 88: else if arg-1 is "check" or "health" or "hearts" or "heart":')

Line 92: Can't compare an integer with a text (line 92: else if arg-1 is "pay" or "give" or "givehearts":')

Line 104: Can't compare an integer with a text (line 104: else if arg-1 is "credits" or "tripp":')

Line 109: 'else' has to be placed just after another 'if' or 'else if' section (line 109: else:')
cinder terrace
#

the else: isnt placed after a if for the line 109 error

graceful zephyr
candid python
#

let me fix the other errors for you

#

it clearly makes sense but alright

graceful zephyr
#

not to me cashskype_scream

candid python
#

btw that ending is confusing

#

with those random else: statements

#

whatever

graceful zephyr
#

oh yeah I only put in one part of the skript so the lines are out of order

candid python
#

I think I know why you got the other errors

#

the arg 1 is a string

#

just like the "text you put in here"

#

but you keep putting or

#

between em

graceful zephyr
#

ok so no or

#

OHHHH

candid python
#

and

#

ur using

#

is

#

maybe put an = or 'is equal to'

#

let me send u possibly fixed code

#

you also started with an "else if" which doesn't make sense there

#

but I changed that too