#1.20.0 broken script

1 messages Β· Page 1 of 1 (latest)

gritty fractal
#

this is the script

#

this is the manifest

#

this is my errors

#

most of them with someof my packs dont matter

silk krakenBOT
#
Debug Result

There is an error in this [code](#1116092579663061153 message):

GUI.js:329:7 - error TS2339: Property 'events' does not exist on type 'World'.

329 world.events.beforeItemUse.subscribe(eventData => {
          ~~~~~~

snow minnow
#

Look at changelog guys

gritty fractal
#

did that

snow minnow
#

so what is problem now?

gritty fractal
#

i am not a js guy i am a command guy

#

so this is hard for me

snow minnow
#

yep, its always hard when are you starting in new topic

#

if i could suggest* dont use experimental feature thy could break your packs

gritty fractal
#

like my whole gui script broke

#

ahh i mean i can check on a diff world but

#

my world with all my realm stuff has ex on it :/

snow minnow
#

hmmm, that problem if you use beforeEvents

#

there is new privileges system as well πŸ’€

gritty fractal
#

so that is all that is wrong ?

#

thenwhat do i put ?

#

also i got this new error

#

ill send it

snow minnow
#

oh manifest change

gritty fractal
#

what do i have to change it to ?

#

i am so sorry again i am good with like commands and packs new to js i want to learn so i can fix stuff my self just dont have the time right now

#

i appreciated any help it is very helpful

snow minnow
#

change versions of modules

#

server module is 1.3.0-beta now

#

and server-ui is 1.1.0-beta

gritty fractal
#

ill try this one second

safe linden
#

Holy crap thats a lot of json ui error messages

gritty fractal
#

i got that

#

{
"module_name": "@minecraft/server",
"version": "1.3.0-beta"
},
{
"module_name": "@minecraft/server-gametest",
"version": "1.0.0-beta"
},
{
"module_name": "@minecraft/server-ui",
"version": "1.1.0-beta"
}

#

do i need to update my uuid for it to work ?

snow minnow
#

sorry i am really tired i gtg

gritty fractal
#

ok please dm me if you got time

safe linden
gritty fractal
#

i still get the error code tho

safe linden
#

What code error specifically?

gritty fractal
#

ill get it

#

ok i think it is this one

#
    let player = eventData.source
    let item = eventData.item
    if (item.typeId == "minecraft:clock") {
        menufunction(player) }
})```
safe linden
#

yeah. if you read that changelogs its now
beforeEvents.itemUse

gritty fractal
#

ok i will try that and yes i read it but it was a little confusing for me

#

ill try that one moment please

safe linden
gritty fractal
#

[Scripting][error]-Plugin [dynamic duo scripts - 1.0.0] - [main.js] ran with error: [TypeError: cannot read property 'blockBreak' of undefined at <anonymous> (blocks.js:6)
]

[Scripting][error]-TypeError: cannot read property 'typeId' of undefined at <anonymous> (GUI.js:332)

#
]

[Scripting][error]-TypeError: cannot read property 'typeId' of undefined    at <anonymous> (GUI.js:332)```
#

that first one is a diffrant script

#

:/ oh no the blocks break is broken too

#

XD

#

damn this update Fed everything up

safe linden
#

Ye. Work through those errors from the change logs. See what it specified was changed. You'll probably have a ton of breaking changes. Expect these every update if your not using stable modules

gritty fractal
#

and i cant use a stable module for EX ?huh

#

this is line 332

#

if (item.typeId == "minecraft:clock") {

safe linden
#

ur item is null

gritty fractal
#

Yeah it can’t read typeid

#

For some reason

safe linden
#

Is that inside itemUse event?

gritty fractal
#
    let player = eventData.source
    let item = eventData.item
    if (item.typeId == "minecraft:clock") {
        menufunction(player) }
})```
#

Yea

#

I fixed that

#

Hang on

#
    let player = eventData.source
    let item = eventData.item
    if (item.typeId == "minecraft:clock") {
        menufunction(player) }
})```
#

cant read typeid

#

that was in the log

#

says type error cant read proporty

safe linden
#

change eventData.item to eventData.itemStack

gritty fractal
#

ill try that

#

native function [action form data ::show] does not have privliges

gritty fractal
#

line 109

#

i cant find it

safe linden
gritty fractal
#

i know it is telling me it has to do with this

#

menu.show(player).then(result => {

#

{show}