#gui help
1 messages · Page 1 of 1 (latest)
try changing runCommand with runCommandAsync but i dont think thats the issue
try checking what item.cost actually returns too
do like js player.sendMessage(`${item.cost}`)
then make sure on the slider
getScore(player, Money)
Money isnt in quotes
i dont know if its on purpouse
but for me it worked just fine
i had to change a few thing cause you didnt provide the code for item.cost
and other variables
is kits from kits/main.js the```js
if (kits) {
let kit = new ModalFormData()
.title(${item.name})...
?
the import { Kits } from './Kits/main.js';
import {createForm} from '../shop_main.js'
import BKits from './BKits.js'
import Kit from './Kit.js'
const category = "Kits"
const type = [
{
name: `Kits`,
itemData: Kit,
texture: `textures/ui/icon_armor`
},
{
name:`BKits`,
itemData: BKits,
texture: `textures/ui/icon_armor`
}
]
export function Kits(player) {
createForm(player,type,category,true)
}
itemData is like the identifier?
i can just put a test one like minecraft:grass
otherwise you have to give me the code of these two too
import BKits from './BKits.js'
import Kit from './Kit.js'
this is what i got
yes
currency wasnt defined i put a $
?
kits
export default [
{
textures: 'textures/blocks/shulker_top_black',
name: 'Test Kit',
cost: 300,
data: 0,
item: 'Test_Kit'
}
]```
BKits
export default [
{
textures: 'textures/blocks/shulker_top_white',
name: 'God Kit',
cost: 30,
data: 0,
item: 'God_Kit'
}
]```
do u want me to give u the whole pack
okay
works fine for me
i had to change a a few things
this is Kit
const Kit = {
Kit: [
{
textures: 'textures/blocks/shulker_top_black',
name: 'Test Kit',
cost: 300,
data: 0,
item: 'Test_Kit'
}
]
}```
i mean i did all of this in one file thats why
const BKits = {
BKits: [
{
textures: 'textures/blocks/shulker_top_white',
name: 'God Kit',
cost: 30,
data: 0,
item: 'God_Kit'
}
]
}```
this is BKits
this is on the Kits/main
const category = "Kits"
const type = [
{
name: `Kits`,
itemData: Kit.Kit,
texture: `textures/ui/icon_armor`
},
{
name:`BKits`,
itemData: BKits.BKits,
texture: `textures/ui/icon_armor`
}
]```
then i did these two because they werent declared
let currency = '$'
let Money = 'money'
thats all i changed
how
i changed a bit
of stuff
like
export function Kits(player) {
createForm(player,type,category,false,true)
}```
export function createForm(player, type, category, enchanted = false, kits = false) {
if (type.length > 1) {
selectionForm(player, type, category).then(result => {
if (result.canceled) return
if (result.selection < type.length) {
Transact(player, type, result.selection, enchanted, kits )
}
if (result.selection == type.length) {
Shops(player)
}
})
} else {
Transact(player, type, 0, enchanted, kits)
} //this code may be wrong because i dont know when its the enchanted menu and when its the kits menu
}```
thats about it
ur a god
there was an issue in the createform function