01-18-2025, 09:11 AM
Hi, I'm currently working on some more advanced console coding stuff and I have ran into an issue. I currently do all my coding in autoexec.cfg, which works as expected when using simple stuff (defining variables and aliases that will be used later). However, when I try to run the aliases that I had defined just a couple lines before, it freaks out and breaks some stuff:
These lines are repeated for each alias call. But when I rerun the script (or later exec a different cfg file) manually, there is no issue. It also gave me grief for using variables which I had not yet defined using the set command (even though their values should have been set using RPN), but I fixed that.
This brings me to a possible solution - hijack some hook (the only one that currently comes to mind is cl_hook_gamestart_all) and let the code run from there. Which does work for the majority of my code, but for some things it is too late. Are there any hooks or aliases that are called after xon is loaded, before joining any game, that I could repurpose?
Code:
menu: program is not loaded
menu: program is not loaded
These lines are repeated for each alias call. But when I rerun the script (or later exec a different cfg file) manually, there is no issue. It also gave me grief for using variables which I had not yet defined using the set command (even though their values should have been set using RPN), but I fixed that.
This brings me to a possible solution - hijack some hook (the only one that currently comes to mind is cl_hook_gamestart_all) and let the code run from there. Which does work for the majority of my code, but for some things it is too late. Are there any hooks or aliases that are called after xon is loaded, before joining any game, that I could repurpose?