Jump to content

Skript Problem


asqx

Recommended Posts

Okay so im making my own gen server alone and I had an error with this skript:

on first join:
    set {start} to 0

command /start:
    trigger:
        if {start} is set to 0:
            execute console command "give %player% white concrete named "&f&lSugar Generator"
        else:
            send "&b&lBakedGens &7You already have a plot!"

 

Error: can't understand this condition: '{start} is set to 0'

If you want to help me make the gen server (only for good skripters) dont be scared and DM me (CraftingHimself#1278)

Link to comment
Share on other sites

5 hours ago, CraftingHimself said:

Okay so im making my own gen server alone and I had an error with this skript:

on first join:
    set {start} to 0

command /start:
    trigger:
        if {start} is set to 0:
            execute console command "give %player% white concrete named "&f&lSugar Generator"
        else:
            send "&b&lBakedGens &7You already have a plot!"

 

Error: can't understand this condition: '{start} is set to 0'

If you want to help me make the gen server (only for good skripters) dont be scared and DM me (CraftingHimself#1278)

So that's not the best way to make a 1 time use command.. Here, use this one instead:
 

command /start:
	trigger:
		if {start::%player's uuid%} isn't set:
			give player white concrete named "&f&lSugar Generator"
			set {start::%player's uuid%} to now
			stop
		else:	
			send "&b&lBakedGens &7You already have a plot!"

So what that does it, when they execute /start, it sets a variable to when they did it so if you ever want to get how long they have been playing the server, you can (Placeholders/skript expression works aswell). 

 

Owner of play.hiveminez.net

 

⊱------------------------------⊰

Joined Minehut on 1/28/2021 (Same day I got Minecraft)

[VIP] - 3/14/2021

[LEGEND] - 5/27/2021

⊱------------------------------⊰

Discord - NotKaizo#0001

In-game name - iKaizo_

If you need any help, feel free to contact me.

Link to comment
Share on other sites

Oh. This too. I suck at skripting so uh

 


command /restart [<offline player>]:
    permission: restart.use.staff
    permission message: &cNo permission!
    usage: &c/restart (player)
    trigger:
        if {start::%arg 1%} is now:
        set {start::%arg 1%} to 0
        send "&b&lBakedGens &7Re-Started %arg 1%'s /start!"

 

it doesn't restart it.

Link to comment
Share on other sites

20 hours ago, CraftingHimself said:

Oh. This too. I suck at skripting so uh

 


command /restart [<offline player>]:
    permission: restart.use.staff
    permission message: &cNo permission!
    usage: &c/restart (player)
    trigger:
        if {start::%arg 1%} is now:
        set {start::%arg 1%} to 0
        send "&b&lBakedGens &7Re-Started %arg 1%'s /start!"

 

it doesn't restart it.

Remove the condition and just delete that variable with delete {var}

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...