Tremulous Forum

General => Troubleshooting => Topic started by: Roanoke on January 17, 2009, 07:28:57 pm

Title: VSTR Bind problems
Post 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
Code: [Select]
unknown command 'sellHere are my binds:
Code: [Select]
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?
Title: Re: VSTR Bind problems
Post by: Bissig on January 17, 2009, 07:31:43 pm
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
Title: Re: VSTR Bind problems
Post by: UniqPhoeniX on January 17, 2009, 07:33:56 pm
Move the " to in front of sell and remove all '.
Title: Re: VSTR Bind problems
Post by: Bissig on January 17, 2009, 07:35:12 pm
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
Title: Re: VSTR Bind problems
Post by: David on January 17, 2009, 09:52:31 pm
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.
Title: Re: VSTR Bind problems
Post by: Bissig on January 17, 2009, 10:25:09 pm
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
Title: Re: VSTR Bind problems
Post by: Roanoke on January 17, 2009, 10:26:09 pm
Thanks Bissig. +1