2called-chaos/gtav-online-ahk

Error "" is not a valid key name

notnorandxnor opened this issue · 4 comments

Sometimes I get an error that says "" is not a valid key name, and the thread exits. Any idea why this is happening? It's not consistent, the same code may or may not trigger this.

Error_not_valid_key_name - Copy

Hmm it's weird that it's not consistent. Do you have any macros not bound to valid keys (or commented them out)? If you don't want a particular thing bound, bind it to something like F24, it will (and should consistently) fail with invalid keys though.

yeah, its quite strange. I feel like it has to do with including custom configs from separate files. Some weird race condition or something. I pasted my custom config inline, and commented out the #Include and all behaves as expected. I'm going to spend a bit more time debugging, but I'd rather play the game for now ;)

Yeah no problem have fun first, work later :)

These kind of errors suck because I can't reproduce it. Maybe a small sleep (50-100ms) before/after the include can iron out whatever is going on

I tried with sleeps (actually used 1000ms) before and after the #Include line, and that didn't resolve the issue. The only thing that works 100% of the time (so far) is to put all my configs in with the main code. I wonder if this is an issue with ahk, will continue to search and test.