Okay, here is your proposal:omniscient wrote:could i do what i asked???
'=' is an assignment operator - it sets the value of the variable on the left-hand side to the value on the right-hand side. 'getcvar test_variable' is not a variable, it is a call to the 'getcvar' function which returns the value of a cvar, not a variable.omniscient wrote:I ahte to bring this back but could i do:
set "test_variable" 2
Then in the script :
Code: Select all
while(getcvar test_variable = 2) waitframe
I assume you meant to test for equality. The correct operator for that is '=='. Alternatively you could test for them not being equal with '!='.
If you testing for equality with '==', the loop above will loop forever while the cvar is set to 2. So when you use 'set "test_variable" 2' as you proposed above before the code runs, it will just sit in that loop forever.
What you need to do is test for difference with '!='. That will make the thread sit in the loop until the cvar becomes equal to 2.
I think if you changed the '=' to '!=' it would do what you want.would that workCode: Select all
iprintlnbold_noloc "Yay I execed the fancy cfg file!!"
I hope this makes sense!
Regards,
David
