#(Resolved)
1 messages · Page 1 of 1 (latest)
There are 21 errors in this [code](#1137629753289998388 message).
Please read the attached file for the result.
is this fixed?
maybe
ok
please try
function page_Home(player) {
let form = new ActionFormData()
form.title(`§l§eBank`);
form.body(`§bWithDraw or Deposit your §aMoney§r here!`);
form.button(`§cDeposit`);
form.button(`§cWithdraw`);
//page_Home.show(player).then((result) => { BEFORE
form.show(player).then((result) => { //AFTER
if (result.selection == 0) page_Deposit(player)
if (result.selection == 1) page_withdraw(player)
})
}
@tender nebula change here
How can I assist?
i am getting same error if i fix it
Which error?
(node:22) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/jail/prog.js:1
import { world, system, Player, MinecraftBlock
I will fix
ok thank you
ok i will try it
✅
@static fossil Thank you for your efforts! and it works fine . i wanted to know what was the issue .
(Resolved) Bank System
It should be const player = data.damagingEntity; not const player = data.entity;
If you need any more assistance, Ping me
Ok
@static fossil Hey sorry for disturbing you , In my bank system for the deposit and withdraw we have to scroll but i need a text field can you do it?
Bank System
@static fossil
How can I assist?
can you help me on this?
Which form function? Example Main_form(player)
page_Deposit , page_withdraw
for deposit we have to use slider but i don't need that , i want to use text field
I will add:
ok
(node:22) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/jail/prog.js:1
import { world, system, Player, MinecraftBlock
There are 24 errors in this [code](#1137629753289998388 message).
Please read the attached file for the result.
@static fossil
here..
show me your all async code
nah, thats not async only async code
huh?
that error means you have error somehwere in async code
place
.catch(er=>console.error(er,er.stack));
after every "then" methods
so it will diplay where your issue is
There are 24 errors in this [code](#1137629753289998388 message).
Please read the attached file for the result.
wait
From what the bot says it looks like formValues may not be defined, and player.scoreboardIdenty is undefined
@sacred kettle does this look right from the logs
chatgpt
google, that error
huh
just don't read properties from possibly undefined values
ok
/home/jail/prog.js:1
world.afterEvents.entityHitEntity.subscribe((data) => {
^
ReferenceError: world is not defined
at Object.<anonymous> (/home/jail/prog.js:1:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Mo
(node:22) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/jail/prog.js:1
import { world } from "@minecraft/server";
^^^
There are 32 errors in this [code](#1137629753289998388 message).
Please read the attached file for the result.
💀The code works in game with no problems
It doesn't work for me, it says cannot get property getScore of undefined
Add the objective "bank" and "money" and set the scores for both 1
Take this code:```js
const allObj = [
'money',
'bank'
];
system.runInterval(() => {
for (const allObjs of allObj) {
try {
world.getDimension('overworld').runCommandAsync(scoreboard players add @a ${allObjs} 0)
world.scoreboard.addObjective(allObjs, allObjs);
} catch (error) { }
}
});
[Scripting][error]-Unhandled promise rejection: TypeError: not a function
@static fossil
form is ok but when i pressed the withdraw and deposit the error pops up
what is the issue?
The code works for me
can you show?
how?
Your game?
I don't know how
💀
hehe
I don't know why you are facing this error
skill issue
?
if your saying that can you fix it?
@static fossil now no need i fixed it and i am closing the post , those who helped me thank you for your efforts