#how do i fix my error

1 messages · Page 1 of 1 (latest)

brisk patrol
#

when i do /reload to run my script it says

[Scripting][error]-ReferenceError: Native function [World::sendMessage] does not have required privileges. at <anonymous> (main.js:3)

[Scripting][error]-Plugin [defualt - 1.0.0] - [main.js] ran with error: [ReferenceError: Native function [World::sendMessage] does not have required privileges. at <anonymous> (main.js:3)
]

thin estuary
#

show your code

#

but i think its becouse your world isnt loaded yet

brisk patrol
#

im just starting and am new to this

#

also it cant be bc my world isnt loaded because i am fully loaded into the world when i do the /reload command to load the script

thin estuary
#

you have to do

world.afterEvents.worldLoad.subscribe(()=>{
    world.sendMessage("Hello world")
})
thin estuary
brisk patrol
#

so they made it more complicated

#

but yes that worked thank you