Closed xYosemite closed 3 years ago
placeholder %string%
should work I think... what if you do parse placeholder %string%
Says cannot understand this condition.
How do you mean exactly? I have tried set {_capper} to placeholder "koth_currentcapper" from player
and parse placeholder "koth_currentcapper" as {capper}
Do you have an example?
Try
set {variable} to parse placeholder "PLACEHOLDER NAME"
to do it without needing a player player argument is supposed to be optional
I tried this originally, does not work.
Are you sure it is optional?
It is supposed to be. I will take a look at this when I can :)
Thanks, man. I hope you can try sort it out ASAP- I want to be able to use this for my KoTH gamemode. :)
Sorry for not giving you an update. I had no issues getting a result without a player present. Here is the code I used:
command /test:
trigger:
set {_p} to parse placeholder "server_tps"
send "RESULT: '%{_p}%'" to executor
It successfully prints the following: RESULT: '*20.0, *20.0, *20.0, '
(This was ran both in game and from console)
PlaceholderAPI 2.10.9 skript-placeholders 1.5.1
Hi, if you've seen the previous version of this comment, it was totally wrong, I thought that I had a problem maybe related to the OP's problem, but with almost all placeholders and especially with %server_tps%
, but I've made the following mistakes:
<none>
, and that was because I've assumed that they're just strings, when in fact they were numbers (I think that should be explicitly stated in the docs, as placeholders are used primarily for representing values as text)All placeholder values are returned as Strings, so I am not sure why you might be having that issue. However, if you got it working okay on your end it should be good. I am going to close this issue because I am still unable to reproduce it. If either of you are still having issues, feel free to comment here (even though it's closed).
1.5.1, latest.
Description
I am trying to implement a way to grab the current capper from a King Of The Hill plugin as I want to give them damage resistance. However, I'm not sure how to make it so the variable {capper} is set to that variable without a player having to be online? I want it to just grab the value of the placeholder and value it in a variable in the script.
Example:
every 1 second in world "world": #this is done as there is no skript even for the koth plugin set {capper} to the placeholder "koth_currentcapper": # trying to set the capper placeholder to the value
This doesn't work as it's not proper syntax, a player is required.
However, this obviously works:
command /capper: trigger: set {_capper} to placeholder "koth_currentcapper" from player message "%{_capper}%"
Is there any way the server can just grab the value of a global variable at any moment without a player needing to be present? Is there any work-arounds? "koth_currentcapper" is from Subside's KoTH plugin and is global, meaning that it's no different for certain players.