Jump to content

I can't find the correct arguments


Recommended Posts

I'm creating a command that is the setblock command but doesn't send anything to the other players, hence shsetblock. But the problem is I don't know how to set an argument in a custom command to block, because I can't find a list of arguments anywhere, and if I load the skript, it tells me I need an argument that indicates blocks. Here's the code for context:

on chat:
	if player has permission "owner":
		set chat format to "&r&4[&r&0&kh&r&4] &r&6&n&l[player] &r&4[&r&0&kh&r&4]&r&b: &r&9[message]"
	else:
		set chat format to "&7[player]&7: &8[message]"

command shgive <item> <player=%player%> [<integer=1>]:
	aliases: /shitem, /shi
	permission: "owner"
	trigger:
		if arg-2 is online:
			if arg-3 < 1:
				send "Cannot give less than one item." to the player
				exit
			else:
				give arg-2 arg-3 of arg-1
		else:
			send "That player is offline." to the player
			exit
			
command shsetblock <text> <text> <integer> <integer> <integer> [<world=%world%>]:
	usage: "<world/self> <blockdata> <Coords>"
	permission: "Owner"
	trigger:
		if arg-1 = "world":
			set {_xpos} to arg-3
			set {_ypos} to arg-4
			set {_zpos} to arg-5
		else if arg-1 = "self":
			set {x.cord} to player's x-coordinate
			set {y.cord} to player's y-coordinate
			set {z.cord} to player's z-coordinate
			set {_xpos} to arg-3 + {x.cord}
			set {_ypos} to arg-4 + {y.cord}
			set {_zpos} to arg-5 + {z.cord}
		else:
			send "Please use world for world coordinates, or self for , for arguement one." to player
			exit
		set block at location at {_xpos}, {_ypos}, {_zpos} in arg-6 to arg-2

So what argument could I use for blocks on arg-2? And could you point me to a list of arguments for future reference?

Link to comment
Share on other sites

For arg-2, instead of <text>, change it to <material> I think. If that doesn't work, maybe also try <item> or <block>

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

On 11/8/2020 at 8:28 PM, guyofallguys123 said:

I'm creating a command that is the setblock command but doesn't send anything to the other players, hence shsetblock. But the problem is I don't know how to set an argument in a custom command to block, because I can't find a list of arguments anywhere, and if I load the skript, it tells me I need an argument that indicates blocks. Here's the code for context:




on chat:
	if player has permission "owner":
		set chat format to "&r&4[&r&0&kh&r&4] &r&6&n&l[player] &r&4[&r&0&kh&r&4]&r&b: &r&9[message]"
	else:
		set chat format to "&7[player]&7: &8[message]"

command shgive <item> <player=%player%> [<integer=1>]:
	aliases: /shitem, /shi
	permission: "owner"
	trigger:
		if arg-2 is online:
			if arg-3 < 1:
				send "Cannot give less than one item." to the player
				exit
			else:
				give arg-2 arg-3 of arg-1
		else:
			send "That player is offline." to the player
			exit
			
command shsetblock <text> <text> <integer> <integer> <integer> [<world=%world%>]:
	usage: "<world/self> <blockdata> <Coords>"
	permission: "Owner"
	trigger:
		if arg-1 = "world":
			set {_xpos} to arg-3
			set {_ypos} to arg-4
			set {_zpos} to arg-5
		else if arg-1 = "self":
			set {x.cord} to player's x-coordinate
			set {y.cord} to player's y-coordinate
			set {z.cord} to player's z-coordinate
			set {_xpos} to arg-3 + {x.cord}
			set {_ypos} to arg-4 + {y.cord}
			set {_zpos} to arg-5 + {z.cord}
		else:
			send "Please use world for world coordinates, or self for , for arguement one." to player
			exit
		set block at location at {_xpos}, {_ypos}, {_zpos} in arg-6 to arg-2

So what argument could I use for blocks on arg-2? And could you point me to a list of arguments for future reference?

i am 99.95% sure it's because you did "owner", not owner. you don't usually use quotaions in usage, permission, permission message, or pretty much anything before the trigger:

EDIT: also noticed one of your permissions for owner are capitalized. don't know if its case sensitive or not, just wanted to point that out.

Edited by Agentgamer100YT
If i helped you please add a reaction to my post!

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

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...