View Single Post
  #4 (permalink)  
Old 05-16-2008, 11:26 AM
John_L John_L is offline
Newbie
 
Join Date: May 2008
Posts: 10
Credits: 0
Rep Power: 0
John_L is on a distinguished road
Default Re: Need some help with my script

no problem. In subroutines a return value is not necessary, but you can include one. It doesn't follow the same structure as high level language though, notice how mine is inside an if statement, so it could in fact never execute, leaving my subroutine without a return value (not allowed in many languages). That was the issue, on certain cases the variables assigned to the subroutine value returned ended up either equaling nothing or whatever may be equivalent to void. So my variables would equal the correct value, but following another execution of the subroutine given a case where the return statement wasn't executed, they were overridden. I hope that makes sense....and is understandable. I just threw in a "error check" if statement to correct the problem.
Reply With Quote