Author Topic: VSTR Bind problems  (Read 2802 times)

Roanoke

  • Posts: 260
  • Turrets: +20/-22
VSTR Bind problems
« 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?

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: VSTR Bind problems
« Reply #1 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
« Last Edit: January 17, 2009, 07:33:50 pm by Bissig »

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: VSTR Bind problems
« Reply #2 on: January 17, 2009, 07:33:56 pm »
Move the " to in front of sell and remove all '.

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: VSTR Bind problems
« Reply #3 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

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: VSTR Bind problems
« Reply #4 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.
« Last Edit: January 17, 2009, 09:54:04 pm by David »
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: VSTR Bind problems
« Reply #5 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

Roanoke

  • Posts: 260
  • Turrets: +20/-22
Re: VSTR Bind problems
« Reply #6 on: January 17, 2009, 10:26:09 pm »
Thanks Bissig. +1