#skript problem
1 messages · Page 1 of 1 (latest)
errors still the same
but with to player
do you have skbee installed?
yes
In newer versions you need to specify the type of the tag as well
such as
string tag "test" of {_nbt}
int tag "test" of {_nbt}```
that should fix the send messages with to player on the end though.
wait
so like
(metadata tag "dooruse" of player) < now
send "&7You need &aKeyCard level %string tag "keycardlevel" of nbt of event-block% or higher &7to open this door!" to player
set metadata tag "dooruse" of player to 1 second later
else:
(metadata tag "dooruse" of player) < now
send "&7You need &aKeyCard level %string tag "keycardlevel" of nbt of event-block% or higher &7to open this door!" to player
set metadata tag "dooruse" of player to 1 second later```
try it
delete skquery
why
skquery is fairly outdated but not likely the cause of these issues, not using it is probably better though as it can be replaced with Skbee.
yeah still same errors whitout skquery
you need to specify the tag types
Can you send the remaining errors?
intstead of tag "" of ..., use int/byte tag "" of ...
whoops that was mentioned
i just scrolled to the errors
.
You have still not put the tag types there.
still not put to player
and missing a type again
its the same 2 errors just repeated.
where to player
...
line 20
always specify who to send messages to
i don't really know witch tag to use
double works with decimals or without, int wont work with decimals
i don't need decimans
hold on i crushed
i know that but i don't know witch one to use
in line 17 if i but int before tag the error disappears
so i should put into before all tags?
ok it works
but the skript doesn't work
no errors
as was said about 3 times, yes
what do you mean "doesnt work", also try debugging
i put in the code send "test" to player
nothing appears on my chat
i don't really know why it doesn't work
well, sicne I cant read minds, i cant help you if I cant see the code...
and if the debug message doesnt show up, a condition fails
permission: op
trigger:
give player iron door named "&cLevel %arg% door" with nbt from "{keycardlevel:%arg%}"
function KeyCard(level:integer) :: item:
return name tag named "&cLevel %{_level}% KeyCard" with nbt from "{keycardlevel:%{_level}%}"
command /givecard <integer>:
permission: op
trigger:
give player KeyCard(arg)
on place of iron door:
nbt of tool has tag "keycardlevel"
set {_tier} to int tag "keycardlevel" of nbt of tool
set int tag "keycardlevel" of nbt of event-block to {_tier}
set int tag "keycardlevel" of nbt of (block above event-block) to {_tier}
send "placed door level %{_tier}%" to player
send "test" to player
on right click on iron door:
nbt of event-block has tag "keycardlevel"
if metadata tag "dooruse" of player is not set:
set metadata tag "dooruse" of player to 10 seconds ago
if nbt of tool has tag "keycardlevel":
if int tag "keycardlevel" of nbt of tool >= int tag "keycardlevel" of nbt of event-block:
if (block data tag "open" of event-block) = false:
open clicked block
play sound "BLOCK_IRON_DOOR_OPEN"
wait 1 second
close clicked block
play sound "BLOCK_IRON_DOOR_CLOSE"
send "test2" to player
else:
(metadata tag "dooruse" of player) < now
send "&7You need &aKeyCard level %string tag "keycardlevel" of nbt of event-block% or higher &7to open this door!" to player
set metadata tag "dooruse" of player to 1 second later
else:
(metadata tag "dooruse" of player) < now
send "&7You need &aKeyCard level %string tag "keycardlevel" of nbt of event-block% or higher &7to open this door!" to player
set metadata tag "dooruse" of player to 1 second later```
i think its becuase i putted the wrong tags
but i don't know what are the right tags to put
debug after each condition and see which one it stops at
permission: op
trigger:
give player iron door named "&cLevel %arg% door" with nbt from "{keycardlevel:%arg%}"
function KeyCard(level:integer) :: item:
return name tag named "&cLevel %{_level}% KeyCard" with nbt from "{keycardlevel:%{_level}%}"
command /givecard <integer>:
permission: op
trigger:
give player KeyCard(arg)
on place of iron door:
nbt of tool has tag "keycardlevel"
set {_tier} to int tag "keycardlevel" of nbt of tool
set int tag "keycardlevel" of nbt of event-block to {_tier}
set int tag "keycardlevel" of nbt of (block above event-block) to {_tier}
send "placed door level %{_tier}%" to player
send "door1" to player
on right click on iron door:
nbt of event-block has tag "keycardlevel"
if metadata tag "dooruse" of player is not set:
send "key1" to player
set metadata tag "dooruse" of player to 10 seconds ago
if nbt of tool has tag "keycardlevel":
send "key2" to player
if int tag "keycardlevel" of nbt of tool >= int tag "keycardlevel" of nbt of event-block:
send "key3" to player
if (block data tag "open" of event-block) = false:
send "key4" to player
open clicked block
play sound "BLOCK_IRON_DOOR_OPEN"
wait 1 second
close clicked block
play sound "BLOCK_IRON_DOOR_CLOSE"
send "test2" to player
else:
(metadata tag "dooruse" of player) < now
send "&7You need &aKeyCard level %string tag "keycardlevel" of nbt of event-block% or higher &7to open this door!" to player
set metadata tag "dooruse" of player to 1 second later
else:
(metadata tag "dooruse" of player) < now
send "&7You need &aKeyCard level %string tag "keycardlevel" of nbt of event-block% or higher &7to open this door!" to player
set metadata tag "dooruse" of player to 1 second later```
when i place the door i get this message
try nbt of tool -> NBT compound of player's tool
might also wanna stick some parenthesis in there
doors still dont work + no messages
if theres no messages conditions fail
debug and you might find out
how
broadcast "<something>" after things
broadcast says nothing even after this
why
i guess the nbt compound of the tool doesnt have that tag then
why
you tell me
are you sure you added it correctly?
broadcast the nbt compound of your item
permission: op
trigger:
give player iron door named "&cLevel %arg% door" with nbt from "{keycardlevel:%arg%}"
broadcast "nbt door"```
i get the message
thats not what I asked you to do
oh
how am i supposted to do this
thats pretty much the line
yeah but how do you broadcast the nbt
broadcast ...
i know how to broadcast but idk how to broadcast the "nbt compounds"
just literally put it after the word broadcast
broadcast %nbt_compounds% of item??
then how
bro what is this i've never heard of broadcasting the "nbt compounds" of an item
you're broadcasting it after the condition you know to fail
just do it in an effect command or in another right click event
i get {} if i get the item, place it or right click it
so then its got empty NBT
probably because youre using {keycardlevel:42} instead of like {keycardlevel:42b}, which would make it a byte tag.
I would just set {_item} to 1 of iron door ... set int tag "..." of NBT compound of {_item} to arg-1 give player {_item}
oh yeah this works now
but there is still a problem
oh yeah and the keycard still have {} as value
ok now the message is right
but keys still don't open doors
with the value {} on right click
can you send the updated code
is the broadcast "skript" run?
okay, maybe dont have each message be the same thing then
so then NBT compound of player's tool has tag "keycardlevel" fails
why
i guess it doesnt have the tag
sure