tryed
wait_for(load_wait(300,300,200));
error("ok");
but the ok appear immediatly which is not true because my real load_wait function is this:
function load_wait(short a, short b, var time){
PANEL* ar=pan_create("bmap=loading_map;",5);
var timex=0;
fade_pan_in(ar);
pan_set(ar,a,b);
pan_setcenter(ar); //middle rotation point default
while(timex<time){
ar.angle-=2.3;
timex++;
wait(1);}
fade_pan_out(ar);
ptr_remove(ar);
}
PS: Some commands make part of my own Function library, so it wont work on your side.