const form = new ActionFormData()
form.button("back")
form.button(`attack: ${world.scoreboard.getObjective('attack').getScore(entity.scoreboardIdentity)}`)
form.button(`til next level: ${world.scoreboard.getObjective('attack_r').getScore(entity.scoreboardIdentity)}`)
form.button(`total: ${world.scoreboard.getObjective('attack_xp').getScore(entity.scoreboardIdentity)}`)
form.show(entity).then(data => {
switch (data.selection) {
case 0:
form(entity)
break;
}
})
}```
im having issues with this the rest works but if i click back it pulls an error
#issue with form
1 messages · Page 1 of 1 (latest)
??
import { ActionFormData } from "@minecraft/server-ui";
const attackguide = (entity) => {
const form = new ActionFormData()
form.button("back")
form.button(`attack: ${world.scoreboard.getObjective('attack').getScore(entity.scoreboardIdentity)}`)
form.button(`til next level: ${world.scoreboard.getObjective('attack_r').getScore(entity.scoreboardIdentity)}`)
form.button(`total: ${world.scoreboard.getObjective('attack_xp').getScore(entity.scoreboardIdentity)}`)
form.show(entity).then(data => {
switch (data.selection) {
case 0:
form(entity)
break;
}
})
}
Debug Result
There is an error in this [code](#1147193285778100224 message):
[36m<repl>.js[0m:[33m10[0m:[33m17[0m - [31merror[0m[30m TS2349: [0mThis expression is not callable.
Type 'ActionFormData' has no call signatures.
[7m10[0m form(entity)
[7m [0m [31m ~~~~[0m
Debug (Stable)
I didnt send the whole file just the part having issues
I guess ill send the whole file tommorrow the button back was done the same format as the button that sends you there
Debug Result
There are 4 errors in this [code](#1147193285778100224 message):
[36m<repl>.js[0m:[33m6[0m:[33m28[0m - [31merror[0m[30m TS2304: [0mCannot find name 'world'.
[7m6[0m form.button(`attack: ${world.scoreboard.getObjective('attack').getScore(entity.scoreboardIdentity)}`)
[7m [0m [31m ~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m7[0m:[33m36[0m - [31merror[0m[30m TS2304: [0mCannot find name 'world'.
[7m7[0m form.button(`til next level: ${world.scoreboard.getObjective('attack_r').getScore(entity.scoreboardIdentity)}`)
[7m [0m [31m ~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m8[0m:[33m27[0m - [31merror[0m[30m TS2304: [0mCannot find name 'world'.
[7m8[0m form.button(`total: ${world.scoreboard.getObjective('attack_xp').getScore(entity.scoreboardIdentity)}`)
[7m [0m [31m ~~~~~[0m
``````ansi
[36m<repl>.js[0m:[33m12[0m:[33m17[0m - [31merror[0m[30m TS2349: [0mThis expression is not callable.
Type 'ActionFormData' has no call signatures.
[7m12[0m form(entity)
[7m [0m [31m ~~~~[0m
Debug (Preview)
change the form variable name
Which 1
@kindred pilot hey after i get back from work can you help me look threw my script and help me find out why my scoreboard leveling scripts are acting weird
just open a new post and im sure people will help
either the variable or the function