Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: StraightArrow on March 26, 2019, 09:56:33 pm
Title: Have what I believe to be a race condition. How do I lock the variable/avoid thi
Post by: StraightArrow on March 26, 2019, 09:56:33 pm
I have what I believe to be a race condition. I would prefer to set the flamey_jump function's if statement to a while statement (so it can run without waiting on 'waits' in the first function), but the variable jump_param will go beserk and return the wrong values (even though they are correct with the variable check on the line just before). So the flamey_jump code will execute forever basically. I'm sure threading flamey_jump multiple times a second from the first while loop isn't helping either, but I want to constantly be feeding that variable into the 2nd function to know whether to allow flight or not. I am a very junior scripter so I probably have this all ass backwards (go easy on me).