Forums » Bugs

Self changing aliases

Jul 10, 2003 Eldrad link
An alias can't have its own name in its command, but it can calls another alias that changes it. If at that point the first alias is run the game crashes. Also infinite loops can easily be set up and will crash the game.
Jul 10, 2003 raybondo link
Heh, yeah I just fixed the alias issue of not being able to have itself in there.
However I will have to have some sort of counter to prevent infinite loops. All I can say right now is don't do that. ;)
Jul 10, 2003 Eldrad link
Ya when I did it I was looking for possible problems and was not really expecting everything to work perfectly. : ) Not particularly critical.
Jul 10, 2003 Eldrad link
Hmmmm... well you can now have an alias that changes itself... but it still crashes if you do it.
Jul 10, 2003 Suicidal Lemming link
Hey, i found out about infinite loops first!

/alias loop "say spam ; loop"
/loop

or:

/alias loop "echo la"
/alias loop-return "loop"
/alias loop "loop-return"

Either one crashes it.
Jul 10, 2003 Eldrad link
or
/alias abc "123"
/alias 123 "abc"
Jul 11, 2003 raybondo link
Heh, Suicidal, you reported that bug a while ago but it's not really that important to fix.
Jul 11, 2003 Suicidal Lemming link
At least ya know!

eldrad, yours won't work because when you make the first alias it'll have no clue what the command 123 is.
Jul 11, 2003 Eldrad link
suicidal if you put it into the .cfg problem that avoids it otherwise you have to actually do something like:

/alias 123 none
/alias abc "123"
/alias 123 "abc"


Raybondo how difficult will it be to fix the crashing of self changing aliases?
Jul 11, 2003 raybondo link
I fixed it yesterday.
Aliases are now just a string that gets executed every time you call the alias. I hope that doesn't cause any problems. However I still haven't fixed any infinite loops that this could cause.
Jul 11, 2003 Eldrad link
Still crashes for me I sent a bug report with more detailed information.
Jul 11, 2003 raybondo link
no poop. We didn't release an update yet.
Fixing it just means I fixed it here, not releasing the fix.
Jul 11, 2003 genka link
/me chuckles lightly
Jul 11, 2003 raybondo link
Sorry.
Jul 11, 2003 Suicidal Lemming link
Next time say:

I fixed it yesterday, it will be released in the next version.
Jul 12, 2003 Eldrad link
Lol... sorry Raybondo... my fault
Jul 12, 2003 Forum Moderator link
Hmm, I may have to delete the potty-mouth ;)
Jul 12, 2003 raybondo link
Heh, I edited it. ;)
Jul 12, 2003 Suicidal Lemming link
Me runs circles around ray-bondo chanting, "Potty-Mouth Potty-Mouth Potty-Mouth Potty-Mouth Potty-Mouth"

I think my 14 yea old self is beginning to kick in. =)
Jul 13, 2003 raybondo link
OK, this thread is past done being useful ;)