PDA

View Full Version : A Problem With Executing Configurations


hiimchris
21st November 2007, 09:44
Here is my script:

alias dev1 "developer 1"
alias dev0 "developer 0"
alias scoutcfg "exec Scout.cfg"
alias snipercfg "exec Sniper.cfg"
alias soldiercfg "exec Soldier.cfg"
alias demomancfg "exec Demoman.cfg"
alias mediccfg "exec Medic.cfg"
alias hwguycfg "exec HWguy.cfg"
alias pyrocfg "exec Pyro.cfg"
alias spycfg "exec Spy.cfg"
alias engineercfg "exec Engineer.cfg"
alias cleanupcfg "exec Cleanup.cfg"
bind "F1" "dev1; echo SCOUT CONFIG ACTIVATED; scoutcfg; wait 100; dev0"
bind "F2" "dev1; echo PYRO CONFIG ACTIVATED; pyrocfg; wait 100; dev0"
bind "F3" "dev1; echo SOLDIER CONFIG ACTIVATED; soldiercfg; wait 100; dev0"
bind "F4" "dev1; echo DEMOMAN CONFIG ACTIVATED; demomancfg; wait 100; dev0"
bind "F5" "dev1; echo HWGUY CONFIG ACTIVATED;hwguycfg; wait 100; dev0"
bind "F6" "dev1; echo SNIPER CONFIG ACTIVATED; snipercfg; wait 100; dev0"
bind "F7" "dev1; echo MEDIC CONFIG ACTIVATED; mediccfg; wait 100; dev0"
bind "F8" "dev1; echo SPY CONFIG ACTIVATED; spycfg; wait 100; dev0"
bind "F9" "dev1; echo ENGINEER CONFIG ACTIVATED; engineercfg; wait 100; dev0"
bind "f10" "dev1; echo CLEANUP CONFIG ACTIVATED; cleanupcfg; wait 100; dev0"

The purpose of this script is so that I will have more free buttons on my keyboard, as I play on a laptop. This script is used to execute different binds according to each respective class (aka im a spy one round, so i execute my spy config by pressing F8, and then im engineer next round, so i execute my engineer config by pressing f9).
I have already made the configs in my tf2/tf/cfg folder, and added my custom alias' and binds, there is no problem there, because when I execute manually the scripts load perfectly. The first thing I do when I enter the game is to exec userconfig.cfg, config.cfg, and autoexec.cfg in my console to apply any changes I have made.
As you can see by my script, I binded the F1-F10 keys to execute a different script with each key. The problem is that the echo IS working, but the script IS NOT executing my desired configurations (aka i am a sniper and i press F6, echo works but execution of script doesn't). It works perfectly when I type it in console manually, but when I use a bind to execute specific configurations, it never seems to work. Can someone please help me!:\

JAvEX
21st November 2007, 10:07
The developer cvar was made into a cheatcvar in CSS, and I'm sure it's the same in TF2. I don't have TF2 on this particular comp, so I can't test it. :/ If I'm wrong, someone will give you the right answer. ;p

CR-Elite
21st November 2007, 15:03
here I'll help you a bit
change this section with this 1

bind "F1" "dev1; echo "SCOUT CONFIG ACTIVATED"; exec scoutcfg; wait 100; dev0"
bind "F2" "dev1; echo "PYRO CONFIG ACTIVATED"; exec pyrocfg; wait 100; dev0"
bind "F3" "dev1; echo "SOLDIER CONFIG ACTIVATED"; exec soldiercfg; wait 100; dev0"
bind "F4" "dev1; echo "DEMOMAN CONFIG ACTIVATED"; exec demomancfg; wait 100; dev0"
bind "F5" "dev1; echo "HWGUY CONFIG ACTIVATED"; exec hwguycfg; wait 100; dev0"
bind "F6" "dev1; echo "SNIPER CONFIG ACTIVATED"; exec snipercfg; wait 100; dev0"
bind "F7" "dev1; echo "MEDIC CONFIG ACTIVATED"; exec mediccfg; wait 100; dev0"
bind "F8" "dev1; echo "SPY CONFIG ACTIVATED"; exec spycfg; wait 100; dev0"
bind "F9" "dev1; echo "ENGINEER CONFIG ACTIVATED"; exec engineercfg; wait 100; dev0"
bind "f10" "dev1; echo "CLEANUP CONFIG ACTIVATED"; exec cleanupcfg; wait 100; dev0"

You forgot to put the echo's in " and didnt have exec before the cfg files

Lisa
21st November 2007, 15:11
Well, JAvEX, the echo doesn't seem to be the problem here.

It indeed should work well, I just don't know where you got "wait 100" from..


You forgot to put the echo's in " and didnt have exec before the cfg files
1 shouldn't be necessary and 2 neither (see the aliases above).

Fix the wait 100.

hiimchris
21st November 2007, 22:13
So i should take out the waits? OK, i did but the script still isnt working

and btw cr-elite, the echo was working fine, its the execution of the scripts. your script is useless because my aliases already bound them (aka alias spy "exec spy.cfg") see first post.

P.S. I added the waits because I thought it would leave the echo on-screen for a longer time, now i know thats not the case. And also, if i use developer i can get vac-banned?

Lisa
21st November 2007, 22:21
It works very in CSS (except for developer at that's a cheat cvar there, doesn't seem to be one in TF2 :s), so I assume that it's the confg files that you execute which don't work.

hiimchris
22nd November 2007, 00:21
It works very in CSS (except for developer at that's a cheat cvar there, doesn't seem to be one in TF2 :s), so I assume that it's the confg files that you execute which don't work.

Wrong. When I execute manually on console the configs work fine. My problem is the script isn't executing the configs.

Lisa
22nd November 2007, 00:33
Then I honestly have no idea.

To make sure I tested it in CSS and it worked well, sorry.