Originally Posted By: Yking
Thanks for the help,

This code I gave is only an example, in my actual code there would be a while-loop that contains a c_move. Every loop the c_move is used to move an entity a little bit. Well it doesn't really matter, I cant use return this way so I have to figure out something else I guess smirk

(Passing through the functions argument list does not work in my code, I dont want to call the function again)


"return" exits the function , so any while loop will stop being executed when return is executed from within that function .

while (1)
{
if(bla) then return bla; // this loop wil shut down
wait (1);
}

now look at what I told you about wait so that you understand my confusing post better.

in the manual goto index and type return

read where it says , a function that contains a wait loop can not return a parameter because wait already returns to the calling function before the final return is executed ..

jb

Last edited by Wjbender; 02/25/15 10:09.

Compulsive compiler