#Gui Help
1 messages · Page 1 of 1 (latest)
my bad
its hard to explain
so i was having problems with this home addon i was trying to add to my gui and i figured out what the probelm was but now i have new problems when ever i try to set a home all it says it object object instead of the name i put
let runHome = new Home.default(player)
let actionForm = new ActionFormData()
actionForm.title("SHome GUI")
actionForm.body(`What do you want to do?\n§7do "-h help" for more info`)
actionForm.button("§fSet\n§7add/set new home","textures/ui/color_plus")
actionForm.button("§fChange\n§7change/move your home","textures/ui/book_edit_default")
actionForm.button("§fGo\n§7tp to your home","textures/ui/icon_import")
actionForm.button("§fDelete\n§7remove a house","textures/ui/icon_trash")
actionForm.button("§fList\n§7see all your home","textures/ui/creative_icon")
actionForm.button("§fSpawn\n§7set home as spawn poin","textures/items/bed_red")
actionForm.button("§fPos\n§7see xyz of a house","textures/ui/xyz_axis")
actionForm.button("§4Cancel","textures/ui/cancel")
const actionFormResponse = await ForceShow(actionForm,player)
const {
canceled,
selection,
cancelationReason
} = actionFormResponse
if (canceled === true) {
if (cancelationReason == "userBusy") player.sendMessage({
rawtext: [ {
text: chatPrefix+"can't open ui, please close other ui first"
}]
})
return "cancel"
}
if (selection == 0) {
await setHomeName(player)
run(()=>runHome.addHome(player))
}
if (selection == 2) {
await getHomeName(player)
}
const _r = ["add","move","go","remove","list","setspawn","location","cancel"]
return _r[selection]
}```
the setHome is what im trying to fix first
if (this.allHomeName.length >= this.max_home){
this.srcPlayer.sendMessage({ rawtext: [ { text: `§cyou already has §5${this.max_home}§c home, to add another use §3change§c or remove existing one then add new home` } ] })
}else if (this.allHomeName.includes(args)) {
this.srcPlayer.sendMessage({ rawtext: [ { text: `§cyou have home §5${args}§c, use §3-h change <homeName> §cto change home location` } ] } )
} else {
this.playerPos()
this.srcPlayer.addTag(`§4H_${args}§kD_${this.playerDimId}X_${this.playerX}Y_${this.playerY}Z_${this.playerZ}RX_${this.playerRotX}RY_${this.playerRotY}§r`);
this.srcPlayer.dimension.spawnParticle("minecraft:crop_growth_emitter", {x:this.playerX+0.5,y:this.playerY+0.15,z:this.playerZ+0.5}, new MolangVariableMap())
this.srcPlayer.sendMessage({ rawtext: [ { text: `§ayou set a home name §5${args} §aat §aX:§5${this.playerX}§a, Y:§5${this.playerY}§a, Z:§5${this.playerZ}\n§ause §3-h change ${args} §ato change home location` } ] })
}
}```
here is the code to add a home
what line says object Object?