Solved Local Functions?

  • 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 comminuty!

    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.

Zhync

Active Member
Feb 11, 2022
138
9
18
Hi there, I was wondering if there's a way to have functions only register for one file specifically. For clarification:
File 1 contains a "local" function test(). Because test() is local to file 1, file 2 cannot use it.
Is this a thing?

Thanks.
[doublepost=1678218233,1677305222][/doublepost]I love how supportive the forums are. Anyways, I found a possible solution; using skript-reflect's local expressions and effects. It's unfortunate that I have to rely on an addon for something that *should* be doable in vanilla Skript, but I'm not the dev behind it.
 
Hey there, in case you're still looking for a better way to make local functions:
Local functions are now in Skript 2.7.0-beta1!
upload_2023-3-11_18-10-2.png


It's still a beta though, so you might want to wait for the full release.
 
  • Like
Reactions: Zhync
Hey there, in case you're still looking for a better way to make local functions:
Local functions are now in Skript 2.7.0-beta1!
View attachment 7355

It's still a beta though, so you might want to wait for the full release.
That's actually amazing. I'll wait for 2.7 to fully release, since my server is buggy as-is, but thank you so much for letting me know.
 
  • Like
Reactions: MultiverShaun
Status
Not open for further replies.