Calling functions across 2 separate lua scripts.
Anybody know how to use functions across 2 separate Lua files?
I tried Script.Load and all I get in the game freaking out when I try to use it.
I also need help with calling Server.GetMaxPlayers() properly. I don't know if I'm doign that correctly either. I need an example of both really.
Edit: I think it may be more of a problem with me trying to call Server.GetMaxPlayers(). How do I exactly get the numbers of players the server can hold so I can use it in my script?
Comments
There doesn't seem to be anything special about calling Server.GetMaxPlayers(). Just make sure that you're calling it on the server only, otherwise it won't exist.
Do this: And this:
You should then find that ChosenClass.maxPlayers provides the value you want on the client.
Shared: Server: Client:
Those functions are for a server, not the server. It's only used from the server browser.