#Haven't Updated My Code

1 messages Β· Page 1 of 1 (latest)

worthy gazelle
#

I don't know what happened in these minecraft updates my code doesn't work , it gives me bunch of errors

plush yewBOT
plush yewBOT
lilac wolf
#

@robust ravine having some technical difficulties using the bot for debugging.

plush yewBOT
# worthy gazelle
Debug Result

There are 12 errors from compiler, and 1 errors from ESLint in this [code](#1302518343965610009 message).
Please read the attached file for the result.

robust ravine
#

it was you

lilac wolf
#

Me? πŸ‘€

#

@worthy gazelle did you write the script?

#

Or someone else?

worthy gazelle
#

ofc me

lilac wolf
#

new.js(169,6): Cannot find name 'Vector'.

new.js(232,8): Type 'false' cannot be used as an index type.

new.js(232,8): Type 'true' cannot be used as an index type.

new.js(256,8): Type 'false' cannot be used as an index type.

new.js(256,8): Type 'true' cannot be used as an index type.

new.js(263,4): Property 'then' does not exist on type 'MessageFormData'.

new.js(299,8): Type 'false' cannot be used as an index type.

new.js(299,8): Type 'true' cannot be used as an index type.

new.js(354,20): The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

new.js(355,8): Property 'includes' does not exist on type 'string | number | true'.

new.js(355,8): Property 'includes' does not exist on type 'string | number | true'.

new.js(358,14): Operator '<' cannot be applied to types 'number' and 'string | number | boolean'.

#

Which documentation were you using to reference your code as you wrote it? @worthy gazelle

worthy gazelle
#

i dont remember it was years ago , i think it was microsoft...

lilac wolf
#

So this script is years old?

worthy gazelle
#

i guess

wide barn
plush yewBOT
# wide barn

Debug result for [code](#1302518343965610009 message)

Compiler Result

Compiler found 3 errors:

new.js:2:10 - error TS2305: Module '"@minecraft/server"' has no exported member 'ActionFormData'.

2 import { ActionFormData, ModalFormData, MessageFormData} from "@minecraft/server";
           ~~~~~~~~~~~~~~

``````ansi
new.js:2:26 - error TS2305: Module '"@minecraft/server"' has no exported member 'ModalFormData'.

2 import { ActionFormData, ModalFormData, MessageFormData} from "@minecraft/server";
                           ~~~~~~~~~~~~~

``````ansi
new.js:2:41 - error TS2305: Module '"@minecraft/server"' has no exported member 'MessageFormData'.

2 import { ActionFormData, ModalFormData, MessageFormData} from "@minecraft/server";
                                          ~~~~~~~~~~~~~~~

Lint Result

ESLint results:

new.js

12:10 error 'getScore' is defined but never used @typescript-eslint/no-unused-vars

166:12 error '_' is assigned a value but never used @typescript-eslint/no-unused-vars

166:21 error 'loc' is assigned a value but never used @typescript-eslint/no-unused-vars

176:12 error '_' is assigned a value but never used @typescript-eslint/no-unused-vars

203:16 error '_' is assigned a value but never used @typescript-eslint/no-unused-vars

203:25 error 'loc' is assigned a value but never used @typescript-eslint/no-unused-vars

383:13 warning The /scoreboard command can be replaced by the functionality in Scoreboard/ScoreboardObjective in the @minecraft/server. See https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/scoreboard for more information. minecraft-linting/avoid-unnecessary-command

385:9 warning The /tellraw command can be fully replaced with the Player.sendMessage api in the @minecraft/server module. See https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/player#sendmessage for more information. minecraft-linting/avoid-unnecessary-command

386:9 warning The /tellraw command can be fully replaced with the Player.sendMessage api in the @minecraft/server module. See https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/player#sendmessage for more information. minecraft-linting/avoid-unnecessary-command

387:9 warning The /tag command can be fully replaced with the Entity.addTag api in the @minecraft/server module. See https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/entity#addtag for more information. minecraft-linting/avoid-unnecessary-command

wide barn
plush yewBOT
# wide barn
Debug Result

There are 10 errors from compiler, and 1 errors from ESLint in this [code](#1302518343965610009 message).
Please read the attached file for the result.

wide barn
#

i think these are just ts errors
try it in game

#

@worthy gazelle

worthy gazelle
#

yeah but the gui is not working

wide barn
#

it should now

#

if not
send your content creator log

#

you were using
@minecraft/server
not
@minecraft/server-ui

worthy jasper
#

probably doesn't have server-ui in the manifest