#function does not exist error

1 messages · Page 1 of 1 (latest)

native coral
#

What does it mean when this error occur

#

and how do i fix it

#
function shoot(g:text, p:player, a:integer, damage:integer, speed:integer, shootspeed,integer):
    if {%{_g}%ammo::%{_p}%} > 0:
        if {shot%{_g}%::%{_p}%}  = 1:
            stop
        else:
            remove 1 from {%{_g}%ammo::%{_p}%}
            send action bar "&7Bullets: %{%{_g}%ammo::%{_p}%}%" to {_p}
            make {_p} shoot arrow at speed {_speed}
            set {damagedelt::%{_p}%} to {_damage}
            set {shot%{_g}%::%{_p}%} to 1
            wait {_shootspeed} seconds
            clear {shot%{_g}%::%{_p}%} 
            stop
    else:
        send action bar "&cOut of bullet" to {_p}
        stop
#
        if player's tool is leather horse armor named "&7&lSniper":
            shoot("Sniper", player, 2, 10, 10, 2)