#ERROR: <interface_name> not defined

1 messages ยท Page 1 of 1 (latest)

dreamy dawn
#

Please could anyone tell me why I get an error when I use the next code?``` world.getPlayers().forEach(player=>{
15 const options = new EntityRaycastOptions();
options.maxDistance = 8;

    [...]

34 }) This is the error:[Scripting][error]-ReferenceError: 'EntityRaycastOptions' is not defined at <anonymous> (main.js:15)
at forEach (native)
at <anonymous> (main.js:34)```

bronze elm
#

hi

soft wind
#

You don't need to define interfaces any more, you just create an object with the desired properties

#

const options = { maxDistance: 8 }

dreamy dawn
#

aahh nice I see! ๐Ÿ™Œ ๐Ÿ™Œ

soft wind
#

Most interfaces follow that format now

vale plinth
#

@dreamy dawn resolve the post with tag thanks

dreamy dawn
dreamy dawn
#

no idea how to do it ๐Ÿค”

limpid otter