#actionform help
1 messages · Page 1 of 1 (latest)
Debug Result
There is an error in this [code](#1122880484230316143 message):
[36mtext.js[0m:[33m3[0m:[33m19[0m - [31merror[0m[30m TS2304: [0mCannot find name 'ActionFormData'.
[7m3[0m const gui = new ActionFormData()
[7m [0m [31m ~~~~~~~~~~~~~~[0m
use `` on string, not ''
const Stats = (player) => {
const gui = new ActionFormData()
gui.title('§f- §dStats §f-§r')
gui.body(` §3Money: §7${config.CURRENCY}${metricNumbers(scores["money"])} `)
gui.button(`§l§4Close Menu`)
gui.show(player)
}
also, if you dont need result then you wont need to wait for form promise
you dont need .then()
what line?
Debug Result
There are 7 errors in this [code](#1122880484230316143 message):
[36m<repl>.js[0m:[33m2[0m:[33m7[0m - [31merror[0m[30m TS2451: [0mCannot redeclare block-scoped variable 'world'.
[7m2[0m let { world, system } = mc;
[7m [0m [31m ~~~~~[0m
[36m@minecraft/server.d.ts[0m:[33m8257[0m:[33m15[0m
[7m8257[0m const world: World;
[7m [0m [36m ~~~~~[0m
'world' was also declared here.
``````ansi
[36m<repl>.js[0m:[33m2[0m:[33m14[0m - [31merror[0m[30m TS2451: [0mCannot redeclare block-scoped variable 'system'.
[7m2[0m let { world, system } = mc;
[7m [0m [31m ~~~~~~[0m
[36m@minecraft/server.d.ts[0m:[33m8256[0m:[33m15[0m
[7m8256[0m const system: System;
[7m [0m [36m ~~~~~~[0m
'system' was also declared here.
``````ansi
[36m<repl>.js[0m:[33m2[0m:[33m25[0m - [31merror[0m[30m TS2304: [0mCannot find name 'mc'.
[7m2[0m let { world, system } = mc;
[7m [0m [31m ~~[0m
``````ansi
[36m<repl>.js[0m:[33m12[0m:[33m25[0m - [31merror[0m[30m TS2304: [0mCannot find name 'mc'.
[7m12[0m Object.defineProperty(mc.Entity.prototype, 'scores', {
[7m [0m [31m ~~[0m
``````ansi
[36m<repl>.js[0m:[33m24[0m:[33m91[0m - [31merror[0m[30m TS2731: [0mImplicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.
[7m24[0m if (!entity.scoreboardIdentity) entity.runCommand(`scoreboard players set @s "${obj}" ${score}`);
[7m [0m [31m ~~~[0m
``````ansi
[36m@minecraft/server.d.ts[0m:[33m8256[0m:[33m15[0m - [31merror[0m[30m TS2451: [0mCannot redeclare block-scoped variable 'system'.
[7m8256[0m const system: System;
[7m [0m [31m ~~~~~~[0m
[36m<repl>.js[0m:[33m2[0m:[33m14[0m
[7m2[0m let { world, system } = mc;
[7m [0m [36m ~~~~~~[0m
'system' was also declared here.
``````ansi
[36m@minecraft/server.d.ts[0m:[33m8257[0m:[33m15[0m - [31merror[0m[30m TS2451: [0mCannot redeclare block-scoped variable 'world'.
[7m8257[0m const world: World;
[7m [0m [31m ~~~~~[0m
[36m<repl>.js[0m:[33m2[0m:[33m7[0m
[7m2[0m let { world, system } = mc;
[7m [0m [36m ~~~~~[0m
'world' was also declared here.
where's your full code? i dont see any promise on the thing you sent
i dont see any "scores" variable there, are you sure its that all?
Debug Result
There are 8 errors in this [code](#1122880484230316143 message):
[36mtest.js[0m:[33m3[0m:[33m20[0m - [31merror[0m[30m TS2307: [0mCannot find module '../config' or its corresponding type declarations.
[7m3[0m import config from "../config";
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36mtest.js[0m:[33m30[0m:[33m81[0m - [31merror[0m[30m TS2339: [0mProperty 'displayName' does not exist on type 'Player'.
[7m30[0m const recipientList = world.getPlayers().filter(p => p !== sender).map(p => p.displayName);
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36mtest.js[0m:[33m31[0m:[33m7[0m - [31merror[0m[30m TS2339: [0mProperty 'dropdown' does not exist on type 'ActionFormData'.
[7m31[0m gui.dropdown("Recipient", recipientList, 0);
[7m [0m [31m ~~~~~~~~[0m
``````ansi
[36mtest.js[0m:[33m33[0m:[33m7[0m - [31merror[0m[30m TS2339: [0mProperty 'input' does not exist on type 'ActionFormData'.
[7m33[0m gui.input("Amount", "0", "numeric");
[7m [0m [31m ~~~~~[0m
``````ansi
[36mtest.js[0m:[33m35[0m:[33m26[0m - [31merror[0m[30m TS2345: [0mArgument of type '() => void' is not assignable to parameter of type 'string'.
[7m35[0m gui.button("Transfer", () => {
[7m [0m [31m ~~~~~~~[0m
``````ansi
[36mtest.js[0m:[33m36[0m:[33m32[0m - [31merror[0m[30m TS2339: [0mProperty 'getResponse' does not exist on type 'ActionFormData'.
[7m36[0m const recipientIndex = gui.getResponse().getDropdownResponse(0).getSelectedIndex();
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36mtest.js[0m:[33m38[0m:[33m33[0m - [31merror[0m[30m TS2339: [0mProperty 'getResponse' does not exist on type 'ActionFormData'.
[7m38[0m const amount = parseInt(gui.getResponse().getInputResponse(0).getTypedText(), 10);
[7m [0m [31m ~~~~~~~~~~~[0m
``````ansi
[36mtest.js[0m:[33m52[0m:[33m22[0m - [31merror[0m[30m TS2551: [0mProperty 'getPlayer' does not exist on type 'World'. Did you mean 'getPlayers'?
[7m52[0m const player = world.getPlayer("sender_username"); // Replace with the username of the player
[7m [0m [31m ~~~~~~~~~[0m
[36m@minecraft/server.d.ts[0m:[33m17579[0m:[33m5[0m
[7m17579[0m getPlayers(options?: EntityQueryOptions): Player[];
[7m [0m [36m ~~~~~~~~~~[0m
'getPlayers' is declared here.
you have so many duplicated imports
i was talking about this one
chatgpt doesnt know script api
it does, but only script api from 2021
@modest harness How on earth do u do that
Like the money showing thing
Yes
I don’t want do copy u but
I’m trying to do the same
Yes
Multiple
But I don’t need a new one
I just want to know 2 things:
- How do u get the custom “Stats” writing thing
Ok ty
Oh
Ten font?
Sry what is that
What is it
Can it be downloaded?
Ok
But what is the color code?
For example:
§3 = Cyan
Ok
But what do u do to access it?
Cause I’ve been wondering for months how people use it!
Wait so like where do u have to customise
It
How to get the texture pack?
How to make it?
they scammed u I’m pretty sure it’s galaxy’s ui
It's ok I believe you
It just looks similar
looks noting like mine lol