#Im getting issues with my code. IM kinda new so i need some help

1 messages · Page 1 of 1 (latest)

deep bronze
#

command /secrettracker:
trigger:
if player has permission "tracker.use":
give player a compass named "&5&lTracker"
else:
send "&cYou do not have permission to use this command!"

on right click with compass:
if name of player's tool is "&5&lTracker":
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"

    set {_slot} to 0
    loop all players:
        if loop-player is not player:
            set {_head} to skull of loop-player
            set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
            
            set {_slot} to {_slot} + 1
            set slot {_slot} of {_gui} to {_item}

    open {_gui} to player
    wait 1 tick

    make player execute "trackmenu"

command /trackmenu:
trigger:
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"

    set {_slot} to 0
    loop all players:
        if loop-player is not player:
            set {_head} to skull of loop-player
            set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
            
            format gui slot {_slot} of {_gui} with {_item} to run:
                set {_target} to loop-player
                set {_bossbar} to bossbar with title "&5Tracking %{_target}% - %distance between player and {_target}%m" and progress 100%
                show bossbar {_bossbar} to player
                send "&aYou are now tracking %{_target}%!"
                send "&cYou are now being tracked by Marine_Secret!" to {_target}

                while player is online and {_target} is online:
                    set bossbar {_bossbar}'s title to "&5Tracking %{_target}% - %distance between player and {_target}%m"
                    wait 2 seconds
            
            add 1 to {_slot}

    open {_gui} to player
#

im getting issues

#

with this

spark salmon
#

yea please help us 🙏

ashen walrus
#

what addon are you using for guis

deep bronze
#

i have script gui sk installed too

ashen walrus
#

i dont see it in your plugins

#

and if you have it why dont you use their syntax

deep bronze
#

but is there a fix without that

#

im really confused

#

ive tried looking it up

ashen walrus
#

wdym

deep bronze
#

like to this error

deep bronze
ashen walrus
#

ye

#

either download skript-gui and use its syntax or make guis with normal skript

rich egretBOT
#

Phill suggests that you read this embed

GUIs
What are GUIs?

GUIs are custom inventories that you can use for all sorts of purposes including shops and server selectors. There are two main ways to create them: using normal Skript and using the addon skript-gui

Vanilla GUIs

You won't need to download any extra addons to start making vanilla GUIs! Click Here to get started

skript-gui

Before you start making GUIs with skript-gui, you will have to download the addon here
Once you are ready to begin, Click Here to get started!
This addon simplifies some of the steps of making GUIs such as listening for clicks

Tuske

Tuske is an old addon used for creating GUIs. It has become very outdated and will break all of your code. If you still have this addon installed please switch to skript-gui

deep bronze
#

ok

#

im restarting with the plugin

#

i will see if it works

#

same error

ashen walrus
#

well yeah

deep bronze
#

iu just realized

#

that

#

ok

ashen walrus
#

its still not their sytnax

#

thats tuske syntax

#

skript-gui doesnt have to run

#

you just put :

deep bronze
#

format gui slot {_slot} of {_gui} with {_item}:

#

im either

#

hella stupid

#

or i cant code

#

maybe both

tame vigil
#

try removing "gui" after "format"

deep bronze
#

cannot understand this section

#

command /secrettracker:
trigger:
if player has permission "tracker.use":
give player a compass named "&5&lTracker"
else:
send "&cYou do not have permission to use this command!"

on right click with compass:
if name of player's tool is "&5&lTracker":
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"

    set {_slot} to 0
    loop all players:
        if loop-player is not player:
            set {_head} to skull of loop-player
            set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
            
            set {_slot} to {_slot} + 1
            set slot {_slot} of {_gui} to {_item}

    open {_gui} to player
    wait 1 tick

    make player execute "trackmenu"

command /trackmenu:
trigger:
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"

    set {_slot} to 0
    loop all players:
        if loop-player is not player:
            set {_head} to skull of loop-player
            set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
            
            format slot {_slot} of {_gui} with {_item}:
                set {_target} to loop-player
                set {_bossbar} to bossbar with title "&5Tracking %{_target}% - %distance between player and {_target}%m" and progress 100%
                show bossbar {_bossbar} to player
                send "&aYou are now tracking %{_target}%!"
                send "&cYou are now being tracked by Marine_Secret!" to {_target}

                while player is online and {_target} is online:
                    set bossbar {_bossbar}'s title to "&5Tracking %{_target}% - %distance between player and {_target}%m"
                    wait 2 seconds
            
            add 1 to {_slot}

    open {_gui} to player
#

thiis is the code

#

format slot {_slot} of {_gui} with {_item}:
set {_target} to loop-player
set {_bossbar} to bossbar with title "&5Tracking %{_target}% - %distance between player and {_target}%m" and progress 100%
show bossbar {_bossbar} to player
send "&aYou are now tracking %{_target}%!"
send "&cYou are now being tracked by Marine_Secret!" to {_target}

#

the part with the error is this

tame vigil
#

oh it is make gui slot 1 with item

#

thats in the create gui section

deep bronze
#

what is

#

im sorry

#

im brain is blanking

#

where would i put that

ashen walrus
#

isnt it make or format

#

(make|format) gui [slot[s]] %strings/numbers% (with|to) [[re]mov[e]able|stealable] %itemtype%

tame vigil
#

yea

tame vigil
#

then boom

#

you have the thing

#

you just need it in the section

deep bronze
#

command /secrettracker:
trigger:
if player has permission "tracker.use":
give player a compass named "&5&lTracker"
else:
send "&cYou do not have permission to use this command!"

on right click with compass:
make player execute "trackmenu"

command /trackmenu:
trigger:
set {_gui} to chest inventory with 3 rows named "&5&lPlayer Tracker"

    set {_slot} to 0
    loop all players:
        if loop-player is not player:
            set {_head} to skull of loop-player
            set {_item} to {_head} named "&a%loop-player%" with lore "&7Click to track!"
            format gui slot {_slot} with {_item}
            format gui slot {_slot} of {_gui} with {_item} to run:
                set {_target} to loop-player
                set {_bossbar} to bossbar with title "&5Tracking %{_target}% - %distance between player and {_target}%m" and progress 100%
                show bossbar {_bossbar} to player
                send "&aYou are now tracking %{_target}%!"
                send "&cYou are now being tracked by Marine_Secret!" to {_target}

                while player is online and {_target} is online:
                    set bossbar {_bossbar}'s title to "&5Tracking %{_target}% - %distance between player and {_target}%m"
                    wait 2 seconds
            
            add 1 to {_slot}

    open {_gui} to player
#

this is my updated code

#

i am trying to add it

#

under the set gui

#

it is saying it is outside the gui slot creation editing section

ashen walrus
#

you should put it inside

#

like this

  trigger:
    create a gui with virtual chest inventory with 3 rows named "My EPIC GUI!" and shape "xxxxxxxxx", "x-------x", and "xxxxxxxxx":
      make gui slot "x" with dirt named "! BORDER !"
    open the last gui for the player```
deep bronze
#

command /trackmenu:
trigger:
set {_gui} to virtual chest inventory with 3 rows named "&5&lPlayer Tracker"
make gui slot {_slot} with {_item}
open the last gui for the player

#

it is inside

#

its right unnder the gui

ashen walrus
#

its inline

#

not inside

deep bronze
#

i get new error than

#

with gui

ashen walrus
#

create a gui with virtual chest inventory with 3 rows named "My EPIC GUI!":