Bind mechanism fails

If you've had any problems with Nexuiz, or would like to report bugs, post here.

Moderators: Nexuiz Moderators, Moderators

Bind mechanism fails

Postby Roanoke » Wed Oct 28, 2009 1:20 am

So I have this "mechanism" that switches certain binds from public chat to teamchat while I hold down a certain key. However, I can't get the say command to actually say the alias (it always says the name of the alias), and I can't get it to "translate" the alias. Could someone help?

http://pastebin.com/m1f87221d
Roanoke
Advanced member
 
Posts: 96
Joined: Fri Dec 26, 2008 2:32 am
Location: Camping mortar spawn

Postby divVerent » Wed Oct 28, 2009 7:35 am

Aliases don't work like that, they always are commands (so they only work as first word of a command line).

What you want, instead, is, either:

set fckill "I killed the flag carrier"

and later:

say $fckill
say_team $fckill

or, you can use an alias like this:

alias fckill "$1 I killed the flag carrier"

and later:

fckill say
fckill say_team
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Roanoke » Wed Oct 28, 2009 2:43 pm

Thanks, that worked well. Everything is going as planned.

Also, I never knew you could use $1 like that (to make it virtually like a command).
Roanoke
Advanced member
 
Posts: 96
Joined: Fri Dec 26, 2008 2:32 am
Location: Camping mortar spawn


Return to Nexuiz - Support / Bugs

Who is online

Users browsing this forum: No registered users and 1 guest