Closed Pocanistaken closed 3 years ago
Edit: Still some problem i saved value to player but nothing changed
Super sorry for the late reply.. I somehow missed this.. my bad!!
Are you still having this issue? If so:
Make sure the script is actually meeting the conditions and making it to the replace line too If it is, make sure the placeholder you're putting into the expression is formatted properly If you're still having issues and you're sure it's formatted properly, let me know :D
Firstly haha no problem.I may be a little angry that you answered late
Yeah i still have this issue.I tested what you said but i know the reason of problem its just accepts player but if you set player to any variable for example if you do it like that set {_player} to player it's won't work
command test:
trigger:
set {_player} to player
set {_work} to pDiscordPlaceholderAPI("%yaml value ""DiscordChat.Message"" from ""config""%", player) # it will be work
set {_nowork} to pDiscordPlaceholderAPI("%yaml value ""DiscordChat.Message"" from ""config""%", {_player}) # it won't work i need to this one work for my skript
i hope you got me also you can test it too waitting your answer it would be nice if it wasn't delayed for 3 weeks as soon as possible
This seems to work okay for me. Here is the code I used:
command /placeholdertest <text>:
trigger:
set {_p} to player
broadcast test(player, arg-1)
broadcast test({_p}, arg-1)
function test(p: player, string: string) :: text:
set {_word::*} to {_string} split at " "
loop {_word::*}:
if first character of loop-value contains "%%":
if last character of loop-value contains "%%":
set {_v} to subtext of loop-value from characters 2 to (the length of loop-value - 1)
replace "%loop-value%" in {_string} with "%placeholder {_v} from {_p}%"
return {_string}
COMMAND USED FOR TESTING:
/placeholdertest %player_name% > hey how are you?
The placeholder was properly replaced both times. If I can't reproduce it, there is not much I can do unfortunately. I would recommend updating Placeholder API. You are also running an old version of Skript & server version. It is possible this could be an issue with Skript. Maybe you could try the 1.8 fork found here: https://github.com/Matocolotoe/Skript-1.8/releases/tag/2.5.3
Okay thank you.
Description
Hey i just made a function for get a placeholderapi support for my skript but there is a problem probably about parse
Steps to Reproduce
Function ->
The part where I'm having a problem
Expected Behavior
a Advice to fix problem
Errors / Screenshots
Server Information
btw when i write bug report to here i got a idea for fix this problem just save yaml value to player not a text after probably my problem will fix but I think its must be work beacuse i parsing it to player.