condition2 is not getting initialized; you have condition1 listed TWICE before the while loop
how are these variables getting set? you have three variables with 2 commas in the
same assignment statement
function getstuff() can only return one value, unless it makes multiple calls or you pass
the other vars by reference
lastly, val = -1 will get treated as true because zero is false
================================================================
You can rewrite the loop like this:
something1=something2=val = 0 // they are all false
while (something1 != 20) and (something2 != 10) and (val ==0)
//* MUST get the value for something1, something2, and val INSIDE the loop
something1 = .....
something2 = ....
val = .......
end while