Hey guys,
i would like to know, how I can solve that problem.
I need a result of a function, that contains a while loop for example:
function sec_func(var param1)
{
var i = 0;
var new_value = 0;
while(i < 1000)
{
i++;
new_value += getValue(i);
}
return new_value;
}
function first_func()
{
var my_value = 0;
while(1)
{
my_value = sec_func(50); //no correct result
wait(1);
}
}
The above code is just
only an example.
My problem is, that I dont get the correct result of sec_func, because the function need to much time to give me a correct result. How can I manage that?
Regards, NJ