Its more a problem with subroutines, I was brought up believe goto's are a nonono and gosub routines are just as bad
so its best to use a function when you can even if the function is void and has nothing passed to it
Oh I'm sorry your writing for tier2 I had a glimpse and thought it was tier1 subroutine oh dear I mustve needed sleep
in tier1 it looks like this but theory still same
function dosomething()
select season
case 1:
//dosomething
endcase
case 2:
//dosomething else
endcase
case 3:
endcase
case 4:
endcase
endselect
endfunction
in tier2 I noticed no default
switch(grade) {
case 'A' :
break;
case 'B' :
break
case 'C' :
break;
default :
}
//or level must be int and sometimes cast as int ie(int)(level)
switch(level){
case 0 :
level=gamefunction1();
break;
case 1 :
level=gamefunction2();
break
case 2 :
level=gamefunction3();
break;
default :
}
The problem might not be the code here it may be how it is returning from the called routines by not exiting properly or always the same
for example exiting a non void function with a void parameter but compiler interprets it as 0 or something hard to tell without out seeing more code
when I look aqk your code again it really looks ok I just was lacking sleep and thought you was in tier1 using subroutines but add a default to the case that also may help
fubar