r/Tf2Scripts • • Dec 30 '18

Question I need help with this script [Question/Request]

I have a toggle mic scrpt because I'm a DJ in the Neogenesis trade servers, but when I try to toggle it, my console says "Unknown command: vtoggle"

I don't know why this is happening when it has worked before.

If one of you could actually just send me a script that would be amazing, as I don't have much knowledge in scripting and I'm just using the owner's script.

Here is the script, please let me know what's wrong and please help me fix this issue.

alias vtoggle "von"alias von "+voicerecord; voice_loopback 1; alias vtoggle voff"alias voff "-voicerecord; voice_loopback 0; alias vtoggle von"bind F1 "vtoggle"

4 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/just_a_random_dood Dec 30 '18

The only think I can think of is that because OP is using a + command in the script, his von should be +von and voff should be -von

2

u/KatenGaas Dec 30 '18

Nah that's not it, he's using a basic toggle (press once for on, press again for off). Having a + command in there doesn't matter, it just stays on until its - counterpart is called. So in this case the +voicerecord stays on, until F1 is pressed for a second time, which is when -voicerecord is called.

Also the error shows that the problem is that the alias "vtoggle" is not recognized, indicating that that line of code wasn't executed properly.