PDA

View Full Version : Class selection script problems


Tanzverbot
03-23-2009, 07:07 PM
Not sure if this should go here or in the Tech Help forum, but anyhow:

I recently tried to get some class selection binds to work. Since i don't know the first thing about config stuff, i simply went to the promod wiki and copied some stuff from there. The script works fine, but when loading my autoexec i get the following errors:

"GDF" isn't a valid key
Unknown command 'clientClass'
"GDF" isn't a valid key
Unknown command 'clientClass'
"GDF" isn't a valid key
Unknown command 'clientClass'
"GDF" isn't a valid key
Unknown command 'clientClass'
"GDF" isn't a valid key
Unknown command 'clientClass'
"GDF" isn't a valid key
Unknown command 'clientClass'

This wouldn't bother me at all if it didn't prevent me from joining on custom maps servers. When i try to join on some server with a custom map, the game restarts (as it should), and after the restart i only see the console with those error messages and pretty much cannot do anything besides typing "exit".

This is a part of the script i use, cannot put the whole thing here because that would make the forum explode:


//*GDF Only Binds

// Soldier
bind "UPARROW" "clientTeam GDF; clientClass Soldier 1;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dRocket Launcher^7'" "" "soldier"
bind "UPARROW" "clientTeam GDF; clientClass Soldier 1;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dRocket Launcher^7'" "" "medic"
bind "UPARROW" "clientTeam GDF; clientClass Soldier 1;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dRocket Launcher^7'" "" "engineer"
bind "UPARROW" "clientTeam GDF; clientClass Soldier 1;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dRocket Launcher^7'" "" "covertops"
bind "UPARROW" "clientTeam GDF; clientClass Soldier 1;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dRocket Launcher^7'" "" "fieldops"
bind "UPARROW" "clientTeam GDF; clientClass Soldier 1;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dRocket Launcher^7'" "" "gdfvehicle"
bind "DOWNARROW" "clientTeam GDF; clientClass Soldier 2;wait; addChatLine '^7Respawning as a ^m[Soldier]^7 with a ^dGPMG^7'" "" "soldier"
bind "DOWNARROW" "clientTeam GDF; clientClass Soldier 2;wait; addChatLine '^7Respawning as a ^m[Soldier]^7 with a ^dGPMG^7'" "" "medic"
bind "DOWNARROW" "clientTeam GDF; clientClass Soldier 2;wait; addChatLine '^7Respawning as a ^m[Soldier]^7 with a ^dGPMG^7'" "" "engineer"
bind "DOWNARROW" "clientTeam GDF; clientClass Soldier 2;wait; addChatLine '^7Respawning as a ^m[Soldier]^7 with a ^dGPMG^7'" "" "covertops"
bind "DOWNARROW" "clientTeam GDF; clientClass Soldier 2;wait; addChatLine '^7Respawning as a ^m[Soldier]^7 with a ^dGPMG^7'" "" "fieldops"
bind "DOWNARROW" "clientTeam GDF; clientClass Soldier 2;wait; addChatLine '^7Respawning as a ^m[Soldier]^7 with a ^dGPMG^7'" "" "gdfvehicle"
bind "LEFTARROW" "clientTeam GDF; clientClass Soldier 0;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with an ^dAssault Rifle^7'" "" "soldier"
bind "LEFTARROW" "clientTeam GDF; clientClass Soldier 0;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with an ^dAssault Rifle^7'" "" "medic"
bind "LEFTARROW" "clientTeam GDF; clientClass Soldier 0;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with an ^dAssault Rifle^7'" "" "engineer"
bind "LEFTARROW" "clientTeam GDF; clientClass Soldier 0;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with an ^dAssault Rifle^7'" "" "covertops"
bind "LEFTARROW" "clientTeam GDF; clientClass Soldier 0;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with an ^dAssault Rifle^7'" "" "fieldops"
bind "LEFTARROW" "clientTeam GDF; clientClass Soldier 0;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with an ^dAssault Rifle^7'" "" "gdfvehicle"
bind "RIGHTARROW" "clientTeam GDF; clientClass Soldier 3;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dShotgun^7'" "" "soldier"
bind "RIGHTARROW" "clientTeam GDF; clientClass Soldier 3;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dShotgun^7'" "" "medic"
bind "RIGHTARROW" "clientTeam GDF; clientClass Soldier 3;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dShotgun^7'" "" "engineer"
bind "RIGHTARROW" "clientTeam GDF; clientClass Soldier 3;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dShotgun^7'" "" "covertops"
bind "RIGHTARROW" "clientTeam GDF; clientClass Soldier 3;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dShotgun^7'" "" "fieldops"
bind "RIGHTARROW" "clientTeam GDF; clientClass Soldier 3;wait; addChatLine '^7Respawning as a ^m[Soldier]^7with a ^dShotgun^7'" "" "gdfvehicle"

Szakalot
03-23-2009, 07:30 PM
why you simply cant type in 'reconnect'? I always was dumbed down into the console like you say, with similar 'cant exec sth' mistake from my cfg, i typed in reconnect, retyped password and it was good to go.

and its not exit its 'quit' :p

murka10
03-23-2009, 08:49 PM
Thats one long and confusing class-script...
How about try mine:
//Class -- Text
seta s1t "^v- ^7Soldier^v/^7Aggressor ^v- ^7AR^v/^7Lacerator ^v-"
seta s2t "^v- ^7Soldier^v/^7Aggressor ^v- ^7GPMG^v/^7Hyper ^v-"
seta s3t "^v- ^7Soldier^v/^7Aggressor ^v- ^7RL^v/^7Obliterator ^v-"
seta mt "^v- ^7Medic^v/^7Technician ^v- ^7AR^v/^7Lacerator ^v-"
seta et "^v- ^7Engi^v/^7Constructor ^v- ^7AR^v/^7Lacerator ^v-"
seta ft "^v- ^7FOps^v/^7Oppressor ^v- ^7AR^v/^7Lacerator ^v-"
seta c1t "^v- ^7Covert^v/^7Infiltrator ^v- ^7AR^v/^7Lacerator ^v-"
seta c2t "^v- ^7Covert^v/^7Infiltrator ^v- ^7Sniper^v/^7Railgun ^v-"
//Class -- Vstrs
seta s "vstr s1"
seta c "vstr c1"
seta s1 "clientClass Soldier 0; clientClass Aggressor 0; addChatLine $s1t; seta s vstr s2; seta c vstr c1"
seta s2 "clientClass Soldier 2; clientClass Aggressor 2; addChatLine $s2t; seta s vstr s3"
seta s3 "clientClass Soldier 1; clientClass Aggressor 1; addChatLine $s3t; seta s vstr s1"
seta c1 "clientClass Covertops 2; clientClass Infiltrator 2; addChatLine $c1t; seta c vstr c2; seta s vstr s1"
seta c2 "clientClass Covertops 1; clientClass Infiltrator 1; addChatLine $c2t; seta c vstr c1"
//Class -- Binds
bind "F4" "vstr s"
bind "F5" "clientClass Medic; clientClass Technician; addChatLine $mt; seta s vstr s1; seta c vstr c1"
bind "F6" "clientClass Engineer; clientClass Constructor; addChatLine $et; seta s vstr s1; seta c vstr c1"
bind "F7" "clientClass Fieldops; clientClass Oppressor; addChatLine $ft; seta s vstr s1; seta c vstr c1"
bind "F8" "vstr c"

JaGuaR
03-24-2009, 12:48 PM
the class script i use use's the etqw pro cvar thingy's

bind "F1" "Class 0 0; $say 'Spawning Soldier'" "" "default"
bind "F6" "Class 0 1; $say 'Spawning Pf'" "" "default"
bind "F4" "Class 1 0; $say 'Spawning Medic'" "" "default"
bind "F2" "Class 2 0; $say 'Spawning Engi'" "" "default"
bind "F3" "Class 3 0; $say 'Spawning Fops'" "" "default"
bind "F5" "Class 4 0; $say 'Spawning Acc'" "" "default"
bind "F7" "Class 4 1; $say 'Spawning Sniper'" "" "default"

taken from BJORN's CFG :p

imo, cycle scripts, teamsay spamming ispointless :)

Tanzverbot
03-24-2009, 04:55 PM
Things are getting really weird now:

Without having consciously changed anything, as of today the cfg gets executed without any error messages.

BUT: The following stuff has stopped to work:

seta g_bind_context_anansi "gdfvehicle"
seta g_bind_context_badger "gdfvehicle"
seta g_bind_context_bumblebee "gdfvehicle"
seta g_bind_context_desecrator "stroggvehicle"
seta g_bind_context_goliath "stroggvehicle"
seta g_bind_context_hog "stroggvehicle"
seta g_bind_context_hornet "stroggvehicle"
seta g_bind_context_husky "gdfvehicle"
seta g_bind_context_icarus "stroggvehicle"
seta g_bind_context_mcp "gdfvehicle"
seta g_bind_context_platypus "gdfvehicle"
seta g_bind_context_titan "gdfvehicle"
seta g_bind_context_trojan "gdfvehicle"
bind "MOUSE2" "_vehiclecamera" "" "stroggvehicle"
bind "MOUSE2" "_vehiclecamera" "" "gdfvehicle"

I cannot use my right mouse button to switch to 3rd person anymore. There's no error message, it worked yesterday, and i'm not aware of having changed anything since last week.

edit:
When loading Vanilla, i still get the errors AND the _vehiclecamera bind works. Class binds work in both, pro and vanilla. I have the exact same autoexec in the etqwpro and base subfolders of sdnet\accountname\. Should they be different or somewhere else?

JaGuaR
03-24-2009, 06:32 PM
Things are getting really weird now:

Without having consciously changed anything, as of today the cfg gets executed without any error messages.

BUT: The following stuff has stopped to work:

seta g_bind_context_anansi "gdfvehicle"
seta g_bind_context_badger "gdfvehicle"
seta g_bind_context_bumblebee "gdfvehicle"
seta g_bind_context_desecrator "stroggvehicle"
seta g_bind_context_goliath "stroggvehicle"
seta g_bind_context_hog "stroggvehicle"
seta g_bind_context_hornet "stroggvehicle"
seta g_bind_context_husky "gdfvehicle"
seta g_bind_context_icarus "stroggvehicle"
seta g_bind_context_mcp "gdfvehicle"
seta g_bind_context_platypus "gdfvehicle"
seta g_bind_context_titan "gdfvehicle"
seta g_bind_context_trojan "gdfvehicle"
bind "MOUSE2" "_vehiclecamera" "" "stroggvehicle"
bind "MOUSE2" "_vehiclecamera" "" "gdfvehicle"

I cannot use my right mouse button to switch to 3rd person anymore. There's no error message, it worked yesterday, and i'm not aware of having changed anything since last week.

edit:
When loading Vanilla, i still get the errors AND the _vehiclecamera bind works. Class binds work in both, pro and vanilla. I have the exact same autoexec in the etqwpro and base subfolders of sdnet\accountname\. Should they be different or somewhere else?


all I could suggest doing is deleting the game-made cfg's like 'profile.cfg' in both the MAINBASE folder and the sdnet tanzverbot folder, use your own cfg not as an autoexec but execute it in game with it being the base folder so it would be 'tanzverbot.cfg' or something then in game console type 'exec tanzverbot.cfg' and if wanted you could bind a uselesss key to execute it... bind "something" exec tanzverbot.cfg; addchatline 'Executing ^3tanzverbot.cfg'"

Tanzverbot
03-24-2009, 07:38 PM
GAAAAH

I did pretty much what you suggested.

I moved every single cfg file in base and sdnet to a backup folder.
I created a completely new account.
I created an autoexec including the class selection script and my _vehiclecamera bind.
I start the game and get the error messages "GDF" isn't a valid key" and
"Unknown command 'clientClass'". OK, kind of annoying, but no big deal.
The _vehiclecamera bind works fine, class selection works fine.
I exit the game.
I start the game.
I don't get any error messages while executing the autoexec.cfg.
Class selection works fine, the _vehiclecamera bind does not.
I manually execute the autoexec.cfg and get the above error messages again. _vehiclecamera bind, however, does still not work.

edit: my _vehiclecamera bind only works if i manually delete the bindings.cfg etqw creates in the sdnet\ACCOUNTNAME\ folder before starting the game.

editē: I can work around my problems by simply creating an empty bindings.cfg and making it write protected. However, when connecting to a custom maps server i have to manually execute my autoexec in order for my custom binds to work.

kwisatz_haderach
03-24-2009, 08:07 PM
i'm pretty sure it's a bug (http://community.enemyterritory.com/forums/showthread.php?t=32252)

Dirka_Dirka
03-24-2009, 08:58 PM
remove the clientTeam. its not required and is whats causing the problem.

also try deleting etqwbinds.cfg and etqwconfig.cfg in base, as well as in the etqwpro folders. also delete bindings.cfg and profile.cfg in base/etqwpro folders of the sdnet profile. any screw-ups will be removed as long as your autoexec.cfg is proper - you musta saved something to one or more of those files that isnt in the autoexec file anymore.

Tanzverbot
03-24-2009, 09:26 PM
you musta saved something to one or more of those files that isnt in the autoexec file anymore.

I moved every single cfg file in base and sdnet to a backup folder.

DrFunkenstein
03-27-2009, 04:36 PM
My memory is a bit hazy since I tried to get my class script working long time ago, but as far as I can remember I had to call the script from the autoexec in my profile directory.

I have a separate class selection script that's located in the default base directory under "My Documents\id Software\Enemy Territory - QUAKE Wars\base" but I execute it from the autoexec in my profile directory. In my case "My Documents\id Software\Enemy Territory - QUAKE Wars\sdnet\drfunkenstein\base".

The autoexec in the profile directory looks like this:

exec binds.cfg //this script contains the context binds I use
exec class.cfg //this is the class selection script I use

//eof

I'm not sure what autoexec and what directories you are using to get the script to work. This post will self-destruct if you're trying to do this from the proper directories already.

Hope this helps.

Dr. Funkenstein