r/tf2scripthelp • u/7Arach7 Scripter • Nov 29 '15
Issue Game crash with chat script
Hey, I made a quick chat "roulette" script - hit the button, says something in chat, binds to a new key. However - if I spam my chat bind OR reach the end (each thing has been said once and it's trying to re-bind to the first one) I crash. Help???
Here's an example one (they all crash me, so I figured posting one then fixing the others the same way would work well).
bind "i" "goodcrits"
alias "goodcrits" "goodcrits1"
alias "goodcrits1" "say Do you have a moment to hear about our lord and savior random crits; alias goodcrits1 goodcrits2"
alias "goodcrits2" "say By the power of Gaben, purged!; alias goodcrits2 goodcrits3"
alias "goodcrits3" "say I feel the spirits of Gaben!; alias goodcrits3 goodcrits1"
1
Upvotes
View all comments
Show parent comment
3
u/Kairu927 Nov 29 '15
It looks like you worked from another script and tried to do a similar thing. You were close but slightly off.
You have the key set to
goodcrits. By default it starts asgoodcrits1. This is evident by the linealias "goodcrits" "goodcrits1".Now where you went wrong was: you started redefining
goodcrits1instead of redefininggoodcrits. Simply change the alias redefining statements on the end of each line to setgoodcritsto call the next step. Like so: