#skript-placeholders doesn't work

1 messages · Page 1 of 1 (latest)

brittle birch
#

Papi: 2.11.6
Skript: 2.9.3
skript-placeholders: 1.7.0

obsidian ruin
#

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?
brittle birch
#

plugin loads but creating and getting value doesn't

ancient axle
brittle birch
glossy frost
ancient axle
glossy frost
#

thats for making mb!

#

you have to get the placeholder for a player

ancient axle
#
  if the identifier is "user_points":
    set the result to "something"
glossy frost
#

indent silly willy

ancient axle
#

mb

brittle birch
#

How do I add this to the /rank command?

#

I am begginer in skript

ancient axle
#

just do
send "%getclan_user_points%"

brittle birch
#

I need to change this?
set the result to "something"

ancient axle
#

yes

#

{rank.%player%}
in your case

brittle birch
#

but i want to create a rank rewards in skript with placeholder %getclan_user_points&

ancient axle
#

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

brittle birch
#

but i want to use plugin getclan for my skript

ancient axle
#

ohhh mb

brittle birch
#

%getclan_user_points% -> skript variable

ancient axle
#

set {rank.%player%} to placeholder "%%getclan_user_points%%"

#

double % im pretty sure

brittle birch
ancient axle
#

you also dont need skript-placeholder addon for this, you need placeholder api

#

"You're running outdated version of Skript!"

brittle birch
#

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}%"`

ancient axle
#

youre trying to acces a temporary variable

#

_ means temp and those variables get deleted when the command or event ends

ancient axle
brittle birch
#

on join:
set {rank::%player%} to placeholder "%%getclan_user_points%%"

command /ranktest:
trigger:
send "Ranking: %{rank::%player%}%"

glossy frost
#

try value of placeholder "getclan_user_points"

ancient axle
#

this error you're sending has nothing to do with the code. what version of mc server are you using?

glossy frost
#

also i'd report it to skript-placeholders github. Skript and addons shouldn't produce console errors

ancient axle
brittle birch
#

because of this i think
on join:
set {rank::%player%} to placeholder "%%getclan_user_points%%"

glossy frost
#

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%%"

brittle birch
#

/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

ancient axle
#

do /pl to check if papi, skript-placeholder and skript loaded correctly

brittle birch
#

plugins are loaded

glossy frost
#

since the placeholder is for a player

#

and the console error was saying that offlinePlayer was null

brittle birch
#

command /ranktest:
trigger:
set {rank::%player%} to placeholder "getclan_user_points" for player
send "Ranking: %{rank::%player%}%"
good?

glossy frost
#

yeah try it

glossy frost
#

yay

#

make sure to report that error though and make the title something like "Console error when getting player placeholder without specifying player"

brittle birch
#

ok

#

every 20 seconds:
set {rank::%player%} to placeholder "getclan_user_points" for player

it will work?

glossy frost
#

but i would just set the variable whenever you use it instead

#

could make a function for it

brittle birch
#

/rewards will open a gui and updates value so it is fixed

#

thanks for help

glossy frost
#

ah ok nice

brittle birch
glossy frost
#

`if {rank::%player%} parsed as number is between 100 and 200

#

and make the function return a boolean (true or false)

brittle birch
# glossy frost `if {rank::%player%} parsed as number is between 100 and 200

`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?

glossy frost
#

use {_p} instead of player in the function

brittle birch
glossy frost
#

read the error

brittle birch
glossy frost
#

yes

#

since p in the function represents the player

brittle birch
glossy frost
#

send "" to {_p}

#

in functions

brittle birch
ancient axle
lone tartan
#

Just saying hi lol