RazTK Posted November 16, 2005 If you type something like: alias "test" "echo ...;test" and then type test at the console, the game will crash out. 0 Share this post Link to post
wildweasel Posted November 18, 2005 Somehow I get the feeling that this is a clear-cut case of "Don't Do That." What you're doing is an infinite loop without any sort of wait times in between loops, which typically will steal CPU cycles because there is no room for the CPU to "breathe." Thankfully, Eternity doesn't allow this sort of thing to happen and just crashes out when such a thing is encountered. 0 Share this post Link to post
Quasar Posted November 18, 2005 WildWeasel is right. I took a look at this in the debugger and it is causing a stack overflow, meaning that the function C_RunTextCmd is indirectly executing itself in an infinite fashion as it tries to expand the macro over and over. There's no simple way to prevent this due to the structure of the code without completely forbidding an alias to contain the same text as its own name. This would artificially limit what can be done with aliases in some cases, however. 0 Share this post Link to post
RazTK Posted November 18, 2005 It's crashing even if I do: alias "test" "echo ...;delay 1000;test" I thought Eternity can handle that. 0 Share this post Link to post
Quasar Posted November 18, 2005 I'd assume the alias expansion occurs before the command is executed. I don't know though. It's entirely possible that the delay command doesn't work right; it is a feature from SMMU that I have never tested. Anyways, all of this stuff will get sorted out if/when possible. 0 Share this post Link to post
RazTK Posted November 18, 2005 I figured this problem when I tried to do this kind of script:alias "autosummon" "start" alias "start" "alias ss ss2;alias autosummon stopsummon;ss2" alias "stopsummon" "alias ss stops;alias autosummon start" alias "ss2" "summon doombarrel;delay 1;ss" alias "stops" "echo Stopped" 0 Share this post Link to post
Quasar Posted November 18, 2005 The problem is that console commands are not interpreted anything like scripts; they are parsed and each command is run consecutively, back to back. Delays may be queued up between the commands as they are buffered, but the entire command must be parsed immediately. That means that alias resolving is not deferred to the time of command execution. That's why recursive aliases cause stack overflow. I think I see what you're trying to do, and I don't think it'll work with the way the console currently functions. As you may or may not know depending on whether you've read the Eternity changelog and stuff in here, the entire console is way overdue for a rewrite. I don't know when or how it will happen, but it WILL happen eventually. 0 Share this post Link to post