It's been some time since I've used 3DGS so it might be a stupid question.
(Code may contain errors since I've just typed from the top of my head)
void foo(int* i)
{
*i=5;
wait(1);
*i=6;
}
void main()
{
int a=0;
foo(&a);
wait_for(foo);
printf("%d", a);
}
This example gives me a "5" instead of a "6". Are pointers lost when using waits in a function? Is there a workaround?