Tremulous Forum
General => Troubleshooting => Topic started by: p1337e on January 25, 2009, 09:13:39 pm
-
My build binds dont work, and I just made them. Ive checked everything, but nothing worked.
Every time I pressed the button, all that comes up is "Unknown command medistat"
Please help.
Im using koticz hud.
bind "h" "vstr build"
set build "build reactor;bind h vstr build1"
set build1 "build telenode;bind h vstr build2"
set build2 "build mgturret;bind h vstr build3"
set build3 "build repeater;bind h vstr build4"
set build4 "build medistat;bind h vstr build"
bind "g" "vstr builda"
set builda "build overmind;bind h vstr buildb"
set buildb "build eggpod;bind h vstr buildc"
set buildc "build acid_tube;bind h vstr buildd"
set buildd "build barricade;bind h vstr builde"
set builde "build booster;bind h vstr builda"
-
bind h "vstr builder"
set build "build reactor; set builder vstr build1"
set build1 "build telenode; set builder vstr build2"
set build2 "build mgturret; set builder vstr build3"
set build3 "build repeater; set builder vstr build4"
set build4 "build medistat; set builder vstr build"
set builder "vstr build"
This should work.
Hmm, ok, but this one works *g*:
bind h "vstr builder"
set build0 "build reactor; echo ^3 Building Reactor; set builder vstr build1;"
set build1 "build telenode; echo ^3 Building Telenode; set builder vstr build2;"
set build2 "build mgturret; echo ^3 Building Turret; set builder vstr build3;"
set build3 "build repeater; echo ^3 Building Repeater; set builder vstr build4;"
set build4 "build medistat; echo ^3 Building Medistation; set builder vstr build0;"
vstr build0
It doesnt like variable names that are already used internally, thus "build" can not work. Also, I don't know why it needs those semicolons at the end of each vstr...
-
hmm
i tried that, but it still comes up with unknown command medistat
lol, now it says unknown cmd medistat
-
Try these (my build binds)
//Build binds
//This handles the one-key cycling. H=Cycle
bind h "vstr strucs;"
set node "build telenode; set strucs vstr ret;" //Telenode
set ret "build mgturret; set strucs vstr arm;" //Turret
set arm "build armoury; set strucs vstr medi;" //Armory
set medi "build medistat; set strucs vstr rep;" //Medistation
set rep "build repeater; set strucs vstr tesla;" //Repeater
set tesla "build tesla; set strucs vstr dcc;" //Tesla
set dcc "build dcc; set strucs vstr rc;" //DCC
set rc "build reactor; set strucs vstr node;" //RC
vstr node
I also recommend separating alien and human binds for simplicity's sake.
-
thanks roanake
Could you explain what was wrong? i might need to make more binds, and that would be helpful
BTW can u fix the alien one as well? Thanks
KARMA COOKIE
(if i knew how)
-
See this thread:
http://tremulous.net/forum/index.php?topic=10093.0
-
thanks roanake
Could you explain what was wrong? i might need to make more binds, and that would be helpful
BTW can u fix the alien one as well? Thanks
KARMA COOKIE
(if i knew how)
The vstr in your first post just keeps replacing until it hits the last line. Thats why you need two variables.
From Roanake:
"vstr strucs" is the variable storing the lines for you. Each time you press h one of the vstrs is wrapped up in "strucs". The first command is issued and the next vstr is being stored in "structs" but not executed yet. Next time you press x, the content which is executable gets executed and then the next vstr is stored in "structs".
Whereas your first attempt is like a snail snake eating its tail until nothing of it is left. Thats when it exits the loop and fails.
-
I get it, i think......
if thats the case, how come thuis one works fine?
bind "." "vstr camp"
set camp "say ^1CAMPERS, ^2CAMPERS, ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS; bind . vstr camp1"
set camp1 "say ^2CAMPERS, ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS, ^8CAMPERS; bind . vstr camp2"
set camp2 "say ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS, ^8CAMPERS, ^9CAMPERS; bind . vstr camp"
-
I get it, i think......
if thats the case, how come thuis one works fine?
bind "." "vstr camp"
set camp "say ^1CAMPERS, ^2CAMPERS, ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS; bind . vstr camp1"
set camp1 "say ^2CAMPERS, ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS, ^8CAMPERS; bind . vstr camp2"
set camp2 "say ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS, ^8CAMPERS, ^9CAMPERS; bind . vstr camp"
Because in this case you "rebind" it on-the-fly.
So first "." is bound with "say ^1CAMPERS, ^2CAMPERS, ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS". Next time you press the button it is bound with "say ^2CAMPERS, ^3CAMPERS, ^4CAMPERS, ^5CAMPERS, ^6CAMPERS, ^7CAMPERS, ^8CAMPERS". Whereas with the vstrs, you only have the vstr struct bound. And the CONTENTS of struct change. But, if there is no "stop sign" then vstrs are followed and replaced until the last one is hit. That's why the first one did not work. It worked its way through to the last vstr.
It's difficult to explain. It is mostly the way it is handled internally that changes.
-
Hm... Everything in your first post seems to be correct except that you should rather use
bind h ...
then
bind "h" ...
I think it is the quotes that ruin the command.
Also, I made the experience that Tremulous sometimes just behaves strange. The code basis appears a bit unclean from time to time, I once had bindings that created an advanced granger with the avatar of a battle suit :o Until this very day, I did not find out why, or how I did it, it just appeared for a time and then never again.
You may try out to leave out the quotes around the key identifier tough.
-
Tremulous sometimes just behaves strange
true.......
anyway... the binds work perfectly, thank you all for your help.
Apparently i just dont let the worm eat its own tail and ill be fine :booster: ;)
Thanks again