#Help me fix this code!!!

1 messages · Page 1 of 1 (latest)

silent field
#

Hey I need help to fix this code, thank u guys!!!
This is the entire code

on right click with feather:
if name of player's tool is "&fDash Ability":
remove 1 feather named "&fDash Ability" from player's inventory
play sound "entity.ender_dragon.flap" with volume 1 and pitch 1.5 at player
play sound "entity.player.attack.sweep" with volume 1 and pitch 0.8 at player
set {_v} to vector from yaw player's yaw and pitch 0
set player's velocity to vector(0,0,0)
set player's gravity to off
loop 10 times:
make 20 of firework at location above player with extra 0.3
wait 1 ticks
push player {v} at speed 0.4
make 20 of cloud at location above player with offset vector(0.5, 0.5, 0.5) with extra 0
set player's velocity to vector(0,0,0)
set player's gravity to on
loop 20 times:
make 20 of cloud at location above player with offset vector(0.5, 0.5, 0.5) with extra 0
wait 1 tick

function itemCooldown(p: player, l: timespan) :: boolean:
set {} to difference between {Cooldown::%{_p}'s uuid%::%name of {p}'s held item%} and now
if {} is less than {_l}:
return false
else:
set {Cooldown::%{_p}'s uuid%::%name of {_p}'s held item%} to now
set item cooldown of {_p}'s tool for {_p} to {_l}
return true

function ParticleRing(l: location, r: number):
loop 40 times:
set {_v} to spherical vector radius {_r}, yaw (loop-value * 8), pitch 8
make 1 of sweep_attack at {_l} ~ {_v} with offset vector(0,0,0)

function Sphere(l: location, r: number, p: particle, a: integer):
loop 40 times:
loop 40 times:
set {_v} to spherical vector radius {_r}, yaw (loop-value-1 * 8), pitch (loop-value-2 * 8)
draw {_a} of {_p} at {_l} ~ {_v} with offset vector(0,0,0) with extra 0

timid nacelleBOT
#

Phill suggests that you read this embed

Formatting Code In Discord
Why?

Code blocks make it easier for helpers to identify potential errors -- help them help you!

The Format

```vb
on chat:
broadcast "This is how you format code!"
```

How It Looks
on chat:
    broadcast "This is how you format code!"
Extra Info

On US keyboards, the grave character (`) is located above the tab key on the top left of the keyboard

topaz cloud
#

also read your error messages

silent field
#

i dont understand the error messages 😅

topaz cloud
#
  1. {} is not a variable, you need to give it a name
  2. {p} should also be {_p} as you use in other areas
silent field
#

is that going to fix it?