#Why does it show 0
1 messages · Page 1 of 1 (latest)
your going to have to send alot more info than that
to know which line which displays what is on the image is
\n§l§dGrade: §r§l${dislpayranks}
const dislpayranks = getDisplayRanks(player)
function Rank() {
system.run(() => {
const rank = getRanks(player)
const CosmetiqueRank = new ModalFormData()
CosmetiqueRank.dropdown(`Voici la liste de vos rank.`, rank)
CosmetiqueRank.show(player).then(r => {
const displayrank = r.formValues[0];
player.runCommand(`tag @s remove displayrank:`)
player.runCommand(`tag @s remove displayrank:`)
player.runCommand(`tag @s remove "displayrank:§l§5Père Noel"`)
player.runCommand(`tag @s add "displayrank:${displayrank}"`)
})
})
here is the grade I want to display
Do you have the information you want?
The formValue of a dropdown is the index of your selection
if you select the first option of it it'll be 0
yes I just understood it but how to translate the 0 by my rank
const displayrank = rank[r.formValues[0]];```
I would recommend using a custom type safe form builder.
could you give me some examples of generators?
I have one here posted
you can just snag it from the repo
it has a custom form builder for ActionForm, MessageForm, and ModalForm. Also it has a custom builder for ChestGUI
which uses a resouce pack to render
also it adds the ability to disable buttons
ok thank you this will definitely help me a lot
I was just looking but I don't understand how it works.
Do I need to install a folder?
do you currently use typescript?