#idk why minecraft doesnt leave stuff alone

1 messages · Page 1 of 1 (latest)

brave falcon
#

my code wont work anymore

novel stoneBOT
#
Debug Result

There are 3 errors in this [code](#1118973868527337522 message):

index.js:103:78 - error TS2538: Type 'false' cannot be used as an index type.

103   const target = world.getAllPlayers().find((plr) => plr.name === allPlayers[response.formValues[0]]);
                                                                                 ~~~~~~~~~~~~~~~~~~~~~~

``````ansi
index.js:103:78 - error TS2538: Type 'true' cannot be used as an index type.

103   const target = world.getAllPlayers().find((plr) => plr.name === allPlayers[response.formValues[0]]);
                                                                                 ~~~~~~~~~~~~~~~~~~~~~~

``````ansi
index.js:107:27 - error TS2345: Argument of type 'string | number | boolean' is not assignable to parameter of type 'string'.
  Type 'number' is not assignable to type 'string'.

107   const amount = parseInt(response.formValues[1]);
                              ~~~~~~~~~~~~~~~~~~~~~~