Skript: [SUGGESTION] Private Functions

Created on 23 Jun 2019  路  7Comments  路  Source: SkriptLang/Skript

Description


Sometimes I use the same function name in different scripts, this causes functions to get messed up with 2 diff codes.

We should be able to do private function test(): that only registers for the current script.

Thanks.

enhancement medium

Most helpful comment

maybe local function test():

All 7 comments

maybe local function test():

Sounds super useful!

I think even making functions local by default and adding 'global' functions might work. Or just namespaces for everything.

I think even making functions local by default and adding 'global' functions might work. Or just namespaces for everything.

That would be even better and more useful.

@bensku please, absolutely do not make functions local by default. That's just shit-tons of unneccessary busy work to change for people that have lots of functions

@bensku please, absolutely do not make functions local by default. That's just shit-tons of unneccessary busy work to change for people that have lots of functions

True, if functions will become local by default everyone will have to recode, I think global by default is better.

Yes, that would be a breaking change so that probably won't be happening.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

Anoniempje1234 picture Anoniempje1234  路  3Comments

Eryk1983S picture Eryk1983S  路  3Comments

ghost picture ghost  路  3Comments

wohahobg picture wohahobg  路  3Comments