#My scripts are not working it is saying that world is not defined

1 messages Β· Page 1 of 1 (latest)

sinful trellis
#

can someone help me you see I get this error


[Scripting][error]-Unhandled promise rejection: ReferenceError: 'registerCommand' is not defined

[Scripting][error]-Unhandled promise rejection: ReferenceError: 'registerCommand' is not defined

[Scripting][error]-Plugin [Survival Kits - 1.0.0] - [main.js] ran with error: [ReferenceError: 'registerCommand' is not defined at setupBank (bank.js:6)
at <anonymous> (main.js:9)
]


and I dont know what to do the scripts are attached My dependencies -


"dependencies": [
{
"module_name": "@minecraft/server",
"version": "1.18.0-beta"
},
{
"module_name": "@minecraft/server-ui",
"version": "1.4.0-beta"
}
]
}


worldly jackal
#

@sinful trellis
import registerCommand in bank.js

sinful trellis
#

Wait what is that it

#

was it that simple?

worldly jackal
#

try and see

sinful trellis
#

Actually It didnt work

worldly jackal
#

errors?

sinful trellis
#

the same error

#

consists

worldly jackal
#

you are using the dev folder?

sinful trellis
#

Yes

worldly jackal
#

reload and send your log again

sinful trellis
#

[Recipes][error]-recipes/money_bedrock.json | sk:money_bedrock | The Item: sk:money has invalid stack size: 1000

[Recipes][error]-recipes/money_bedrock.json | sk:money_bedrock | Recipe result malformed

[Recipes][error]-recipes/reducer_chiseled_quartz_block.json | minecraft:chiseled_quartz_block | Material Reduction recipe duplicates a previously registered recipe with input minecraft:chiseled_quartz_block. Skipping recipe.

[Recipes][error]-recipes/reducer_quartz_pillar.json | minecraft:quartz_pillar | Material Reduction recipe duplicates a previously registered recipe with input minecraft:quartz_pillar. Skipping recipe.

[Recipes][error]-recipes/reducer_smooth_quartz.json | minecraft:smooth_quartz | Material Reduction recipe duplicates a previously registered recipe with input minecraft:smooth_quartz. Skipping recipe.

[Scripting][error]-Unhandled promise rejection: ReferenceError: 'registerCommand' is not defined

[Scripting][error]-Unhandled promise rejection: ReferenceError: 'registerCommand' is not defined

[Scripting][error]-Plugin [Survival Kits - 1.0.0] - [main.js] ran with error: [ReferenceError: 'registerCommand' is not defined at setupBank (bank.js:6)
at <anonymous> (main.js:9)
]

[Recipes][error]-recipes/money_bedrock.json | sk:money_bedrock | The Item: sk:money has invalid stack size: 1000

[Recipes][error]-recipes/money_bedrock.json | sk:money_bedrock | Recipe result malformed

[Recipes][error]-recipes/reducer_chiseled_quartz_block.json | minecraft:chiseled_quartz_block | Material Reduction recipe duplicates a previously registered recipe with input minecraft:chiseled_quartz_block. Skipping recipe.

[Recipes][error]-recipes/reducer_quartz_pillar.json | minecraft:quartz_pillar | Material Reduction recipe duplicates a previously registered recipe with input minecraft:quartz_pillar. Skipping recipe.

[Recipes][error]-recipes/reducer_smooth_quartz.json | minecraft:smooth_quartz | Material Reduction recipe duplicates a previously registered recipe with input minecraft:smooth_quartz. Skipping recipe.

[Scripting][error]-Unhandled promise rejection: ReferenceError: 'registerCommand' is not defined

[Scripting][error]-Unhandled promise rejection: ReferenceError: 'registerCommand' is not defined

[Scripting][error]-Plugin [Survival Kits - 1.0.0] - [main.js] ran with error: [ReferenceError: 'registerCommand' is not defined at setupBank (bank.js:6)
at <anonymous> (main.js:9)
]

#

**[Recipes][error]-recipes/money_bedrock.json | sk:money_bedrock | The Item: sk:money has invalid stack size: 1000

[Recipes][error]-recipes/money_bedrock.json | sk:money_bedrock | Recipe result malformed**

#

This error is my mistake Ill fix it

#

But the other errors

#

I dont know

worldly jackal
#

how did yo import it

sinful trellis
#

what do you mean??

#

is it the registrationcommand

worldly jackal
#

how did you import the registerCommand

sinful trellis
#

hey can you wait

#

it started to rain

#

bye

worldly jackal
#

huh

tropic glacier
#

what

#

lol

#

did it rain inside your house

#

then he said bye

sinful trellis
#

import { registerCommand } from "./commands";

#

This is how I imported

#

it is thundering right now

#

so I came back to answer your question

#

NOW bye

tropic glacier
#

[comes back again]
[proceeds to answer question]
[says that it is thundering right now]
[gets shot by thunder]
[leaves]

sinful trellis
#

??

#

it is still raining slightly

#

but the thundering and lightning stopped

#

and for your confirmation

#

I didnt get shot by lightning

#

and you cant get shot by thunder

fallow brook
main turtle
#

rain could interfere with internet

tropic glacier
#

fr

fallow brook
sinful trellis
#

Ye

#

One time my router got lightninged

#

So thats why ive been

#

trying to avoid it again

sinful trellis
#

Hey can you pls help me

#

umm

#

yesterday wasnt the best day

#

I couldnt solve the problem

#

could you help me pls

main turtle
sinful trellis
#

I added that still dont work

main turtle
#

any new errors?

sinful trellis
#

let me check

#

No but I have written it like this import { registerCommand } from "./commands";

#

I doubt that the small difference is the reason why it isnt working

#

hmm is it because the server ver is 1.18.0-beta and the server ui ver is 1.4.0-beta even though my game ver is 1.21.62

main turtle
#

nope

sinful trellis
#

hey I updated the code

#

this KINDA works

#

but not fully YET!

#

almost every UI works