Y_INI parameter query
#1

So here the thing. I was playing around with Y_INI a bit then a few days ago I realized there's a parameter in the function which I haven't used. Like ever. Which is .bLocal.

Код:
INI_ParseFile(fname[], remoteFormat[], bool:bFileFirst = false, bool:bExtra = false, extra = 0, bool:bLocal = true, bool:bPassTag = false, bool:bFilter = true, filter[] = "")
Now I've seen in wikis/forums that it enables the function to call in local functions while parsing files.

Let me cut to the chase. I'm creating a GM and the approach is modular. So I need a function which is local (cannot be accessed from another file) and then configure the INI_ParseFile to access that particular local function. I know that the function which is to be called by the parser needs to be public. But let's just say that the circumstance wants that the function to be called be local, inaccessible from outside the scope.

If someone could give me a brief explanation with an example. Stressing on the example more than the explanation would be much appreciated.

~iSpark
Reply
#2

Local in this context means "in the current filterscript/gamemode", not "current file". If you want keep loading constrained to this file only, I'd recommend y_inline (search the forums for an example).

#e: Welp, too slow again
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
If it is true, y_ini uses CallLocalFunction. If it is false, it uses CallRemoteFunction. The first will only call your load callback in one script (the local script), otherwise it will call it in all scripts. I'm not writing an example.

Also, you can't have a static public function. I've had a few instances where it would have been nice, instead I've just resorted to the convention of prefixing them with "_" (though I'm recently preferring the suffix, as that as a prefix should be reserved for the compiler and system libraries).
Thank you. I wasn't expecting a response from ****** himself. Man am I honored.

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Local in this context means "in the current filterscript/gamemode", not "current file". If you want keep loading constrained to this file only, I'd recommend y_inline (search the forums for an example).

#e: Welp, too slow again
Thanks for opening my mind to a whole new set of things to discover. Y_Inline. Seems like more work needs to be done and learnt.


This can be set to answered/archived.
~iSpark.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)