#skript-placeholders doesn't work
1 messages · Page 1 of 1 (latest)
we're gonna need a bit more than "doesn't work". what specifically doesn't work?
- Does the plugin not load?
- Does creating your own placeholder not work?
- Does getting the value of the placeholder not work?
- Any errors?
plugin loads but creating and getting value doesn't
code snippet would help
command /rank:
trigger:
set {rank.%player%} to placeholder "getclan_user_points"
send "Points: %{rank.%player%}%"
(mvdw[ ]placeholder[ ]api|mvdw) placeholder [with [the] name|named] %*string%
thats not how placeholders work, atleast not with skript-placeholder
if the identifier is "user_points":
set the result to "something"
indent silly willy
mb
just do
send "%getclan_user_points%"
I need to change this?
set the result to "something"
but i want to create a rank rewards in skript with placeholder %getclan_user_points&
i also suggest making it {rank::%player's uuid%}
%player% might lose it's value when a player changes their mc name on the microsoft website
but i want to use plugin getclan for my skript
ohhh mb
%getclan_user_points% -> skript variable
set {rank.%player%} to placeholder "%%getclan_user_points%%"
double % im pretty sure
you also dont need skript-placeholder addon for this, you need placeholder api
"You're running outdated version of Skript!"
i know but i have errors if I update it to the newest
`on join:
set {_rank} to placeholder "%%getclan_user_points%%"
command /ranktest:
trigger:
send "Ranking: %{_rank}%"`
youre trying to acces a temporary variable
_ means temp and those variables get deleted when the command or event ends
set {rank::%player%} to placeholder "%%getclan_user_points%%"
on join:
set {rank::%player%} to placeholder "%%getclan_user_points%%"
command /ranktest:
trigger:
send "Ranking: %{rank::%player%}%"
try value of placeholder "getclan_user_points"
this error you're sending has nothing to do with the code. what version of mc server are you using?
also i'd report it to skript-placeholders github. Skript and addons shouldn't produce console errors
ok
this is an error that gets sent when you restart the server right?
1.20.4 paper
when i joined server
because of this i think
on join:
set {rank::%player%} to placeholder "%%getclan_user_points%%"
yeah dont use percents
in the placeholder string
if you're just getting the placeholder. it's only used when returning a string with the placeholder in it
like "look at this cool placeholder %%whatever%%"
/ranktest
command /ranktest:
trigger:
set {rank::%player%} to placeholder "getclan_user_points"
send "Ranking: %{rank::%player%}%"
it means "Internal server error occured"
on command /ranktest
do /pl to check if papi, skript-placeholder and skript loaded correctly
plugins are loaded
try placeholder "getclan_user_points" for player
since the placeholder is for a player
and the console error was saying that offlinePlayer was null
command /ranktest:
trigger:
set {rank::%player%} to placeholder "getclan_user_points" for player
send "Ranking: %{rank::%player%}%"
good?
yeah try it
yay
make sure to report that error though and make the title something like "Console error when getting player placeholder without specifying player"
ok
every 20 seconds:
set {rank::%player%} to placeholder "getclan_user_points" for player
it will work?
loop all players and use loop-player
but i would just set the variable whenever you use it instead
could make a function for it
ah ok nice
function checkrank(p: player):
if {rank::%player%} is #from 100 to 200
how i can do that?
`if {rank::%player%} parsed as number is between 100 and 200
and make the function return a boolean (true or false)
`on join:
set {rank::%player%} to placeholder "getclan_user_points" for player
command /ranking:
trigger:
set {rank::%player%} to placeholder "getclan_user_points" for player
send "Ranking: %{rank::%player%}%"
checkrank(player)
rank(player)
function checkrank(p: player):
if {rank::%player%} parsed as number is between 550 and 600:
send "550 do 600"
else if {rank::%player%} parsed as number is between 601 and 650:
send "601 do 650"
function rank(p: player):
set {_gui} to chest inventory with 6 rows named "&1Ran&fk&4ing"
set slot 12 of {_gui} to netherite scrap named "&cJuż niedługo!" with custom model data 14
open {_gui} to {_p}
on inventory click:
name of event-inventory is "&1Ran&fk&4ing"
cancel event
if clicked slot is 12:
execute player command "gui1"`
can you fix it?
use {_p} instead of player in the function
Which lines?
read the error
{rank::%{_p}%} ?
it works, thanks
Hi
hello, this is not the place to talk tho lol
Just saying hi lol