Solved Function with variable in its name

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

SniperFox

Member
May 31, 2017
29
0
1
Hello. How can i evaluate function with variable in it? Uh, for example:

Code:
set {_tmp::name} to "Test"
someFunction%{_tmp::name}%()
 
You can't, you will have to pass it into an argument. You could also evaluate the effect as a string (with skript-mirror/SkQuery)
 
You can't, you will have to pass it into an argument. You could also evaluate the effect as a string (with skript-mirror/SkQuery)

Thanks a lot. Here is an effect from TuSKe (If you(Who reads this) is interested in this):

Code:
set {_effect} to "send"
evaluate:
    %{_effect}% "This message will be sent to a player."
#Before parsing the code, it will convert all variables
#To string, basically it will interpret the code above as it
#was a whole string: "%{_effect}% ""This message will be sent to a player."""
#where Skript will replace '%{_effect}%' with the variable value and then it will parse
#The code. It is the same concept of Skript Options.
 
Status
Not open for further replies.