-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Needs to be able to run first #5
Comments
But do you really need to be able to control the order in this case? Other scripts with commands should be able to register even if the server hasn't started? |
console.server is not available until console.start() is called so anything which uses console.server will not work until console.go gets a chance to init. I solved it for me by putting the same functions that console.go has into the script I can using console.server with on its init. |
This seems like it's a super sensible solution to that problem if you were to do this maybe via a module and using a flag that only pops once to toggle execution. Are there other use cases for a guaranteed run-first script that can't be solved by a similar solution? |
It should be possible to solve this in defcon.lua too. Let me take a look. |
This project is a decent example of why we need to be able to have a script which is guaranteed to be ran first within the init/update lifecycles since the console.go needs to init to start the server, but other scripts could have server commands on their init too.
The text was updated successfully, but these errors were encountered: