General > Off-Topic
Private repo/Targetting
Megiddo:
What do you mean by environment? ULX runs in both the client and server Lua states. You can call any ULX or ULib function you desire in both as they are global tables.
iViscosity:
I guess I never said what I meant by environment, I mean in the 'lua/ulx/<modules>/'. Something like that.
So both ULib and ulx functions are global, and can be called anywhere? I just want to make sure even thought I'm sure you've both probably answered and I'm just not understanding. And that is now ULib.getUser works, correct?
MrPresident:
lua doesn't work that way..
The only time code can't be used anywhere in lua is if you define it as local, in which case they can only be used in the file they're created, or inside of the function they're created in.
Otherwise, it's global and you can call it from any file you want.
iViscosity:
That's something new to me, I actually didn't know that. Sorry if I'm frustrating you all I was just trying to understand. I didn't know lua worked like that.
MrPresident:
Lua loads into one giant environment.
Well.. 2.
One clientside and 1 serverside.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version