Tremulous Forum
General => Troubleshooting => Topic started by: Roanoke on January 17, 2009, 07:28:57 pm
-
So I want to set up a key that will cycle through the weapons I can buy at the armory. I press it once, I get shotty, press it again, chain, etc. However, it tells me
unknown command 'sell
Here are my binds:
bind f3 "vstr weap"
set rifle "bind f3 'sell weapons; buy bsuit; buy larmour; buy helmet; buy rifle; set weap vstr shotgun; echo Rifle loaded.'" //Offensive
set shotgun "bind f3 'sell weapons; buy bsuit; buy larmour; buy helmet; buy shotgun; buy rifle; set weap vstr chain; echo Shotgun loaded.'" //Shotgun
set chain "bind f3 'sell weapons; buy bsuit; buy larmour; buy helmet; buy chaingun; buy rifle; set weap vstr luci; echo Chainsuit loaded.'" //Chain
set luci "bind f3 'sell weapons; buy bsuit; buy larmour; buy helmet; buy lcannon; buy rifle; set weap vstr rifle; echo Lucisuit loaded.'" //Luci
vstr rifle
Could someone point out the flaw here?
-
Drop the ` after the "bind f3" command and use a semicolon.
F.e.:
set rifle "bind f3; sell weapons; buy bsuit; buy larmour; buy helmet; buy rifle; set weap vstr shotgun; echo Rifle loaded." //Offensive
-
Move the " to in front of sell and remove all '.
-
Ah, I see, sorry:
set rifle "bind f3 "sell weapons; buy bsuit; buy larmour; buy helmet; buy rifle; set weap vstr shotgun; echo Rifle loaded."" //Offensive
-
wont work, it will set rifle to "bind f3 sell" and then complain weapons doesn't exist.
You can't nest quotes, you can't escape quotes, and ' has no special meaning.
Although you shouldn't need to for this.
-
In that case:
set rifleconfig "sell weapons; buy bsuit; buy larmour; buy helmet; buy rifle; set weap vstr shotgun"
set rifle "bind f3 vstr rifleconfig; echo Rifle loaded.'" //Offensive
-
Thanks Bissig. +1