Xor 4 Oca @ 1:10pm
Alias wont work with Bind command? Why?
Can anyone explain to me why this alias doesn't work?

alias switch "bind v "+mouse_menu Ellis""
switch
bind <key> [command] : attach a command to a key<---usage message results

I keep getting usage messages which imply an error trying to bind the v key to the command +mouse_menu Ellis, where "Ellis" is a perfectly functioning radial menu. It works fine when i enter it manually as "bind v "+mouse_menu Ellis"", but not when im trying to make it into a simple alias. The alias seems to strip out the "" marks, so the command either flat out fails w/o quotes, or i get that usage message because the bind wont execute properly. And of course w/ no error codes explaining to me why this happens (unless there is a log file somewhere that im unaware of), it's a total mystery. I had this code working in the past to cycle through menus hitting one key. Then i hit the V key to use the menu. It just doesn't seem to work now (i reinstalled my OS along w/ L4D2).
10 yorumdan 1 ile 10 arası gösteriliyor
< >
Ada Wong 4 Oca @ 1:24pm 
It seems like you have two many " marks I believe it should look like this: alias +menuEllis "+mouse_menu ellis"
Xor 4 Oca @ 1:40pm 
Ada Wong tarafından gönderilen ileti:
It seems like you have two many " marks I believe it should look like this: alias +menuEllis "+mouse_menu ellis"

It still doesn't work because when i go to bind it later the menu doesn't work and i get errors about unknown command: -menuEllis.

I think they changed how +mouse_menu works so you don't have to include -mouse_menu, but im really just wondernig why I can't alias a bind v "mouse_menu Ellis" command. It simply doesn't want to work.

This command alias switch "bind v "+mouse_menu Ellis"" doesn't work when i try to bind switch to a key. And it seems it's because of the fact that there is a nested command in quotes. The only thing is im sure ive done this in the past to program a simple radial menu switch key (where each press runs +mouse_menu <survivor>).
Ada Wong 4 Oca @ 3:54pm 
You mind uploading your cfg file so I can take a look at what you wrote.
Xor 4 Oca @ 3:56pm 
Ada Wong tarafından gönderilen ileti:
You mind uploading your cfg file so I can take a look at what you wrote.

Nah...i figured a work around for the menus. The above code is what doesn't work. Type this into the console and youll get he same result.

alias switch "bind v "+mouse_menu Ellis""
switch
bind <key> [command] : attach a command to a key

Im simply wondering why it doesn't work.
Xor 4 Oca @ 4:01pm 
I also can type alias switch bind v "+mouse_menu Ellis" and it does the same thing when i type switch. This is just an alias of the command. I dont see what the difference is between typing "switch" and typing bind v "+mouse_menu Ellis" into the console. The latter seems to work but the former doesn't. That makes no sense as they are both the same statement.
En son Xor tarafından düzenlendi; 4 Oca @ 4:02pm
Ada Wong 4 Oca @ 4:24pm 
Oh yeah you didn't need the "switch" part but I thought you was writing this to be auto config so you didn't have to keep typing in this command in which there you have alias in it.
Xor 4 Oca @ 6:04pm 
Ada Wong tarafından gönderilen ileti:
Oh yeah you didn't need the "switch" part but I thought you was writing this to be auto config so you didn't have to keep typing in this command in which there you have alias in it.

Well ultimately i was going to put it in an autoexec.cfg file, but as it stands the command doeesn't bind correctly anyways. It doesn't matter if i put it in or not. Any command that is put in an autoexec file is no different than typing it at the command line. Im just wondering why it wont bind when run from an alias.
Ada Wong 5 Oca @ 7:23am 
Well for one I usually use the alias for when doing more than one thing like menus or more camera movement for third person mode in campaign. You still have to put the default wording of bind command then whatever code to have it remember it.
Xor 5 Oca @ 1:16pm 
Ada Wong tarafından gönderilen ileti:
Well for one I usually use the alias for when doing more than one thing like menus or more camera movement for third person mode in campaign. You still have to put the default wording of bind command then whatever code to have it remember it.

Sure that's valid. But im simply trying to do this:

<alias switch "bind v "+mouse_menu Ellis""
switch>

And i get this:

"bind <key> [command] : attach a command to a key" which means the above code doesn't work. So im trying to find out why i can't alias a bind command. And it has to do with embedded quotes because it works fine w/o the inner quotes. It has something to do w/ the way bind processes the command +mouse_menu Ellis, w/ and w/o quotes.

But anyways i did get a workaround for it, so thanks for your input. I appreciate it :)

Ada Wong 5 Oca @ 1:19pm 
No problem let me know if you end up with any more issues.
10 yorumdan 1 ile 10 arası gösteriliyor
< >
Sayfa başına: 15 30 50
Gönderilme Tarihi: 4 Oca @ 1:10pm
İleti: 10