Several errors prevented the code to understand it in PRT, and the return word in the end couldn’t be read as such in the wake of all preceding errors.
List of errors:
– using ‘ instead of // to add comments at end of lines, makes it read the words of the attempted comments as coding language with errors
– using H which is an old reserved word for hours even if not used now, you can replace it elsewhere too in the code with “myH” or another name if you don’t like myH
– there are 3 endif for 2 if, I have commented out one of them (unless it was associated to a third “if” not given in the copy paste adding to the confusion, in which case you can leave it in instead…
Chances are: it wasn’t a PRT code to start with, and if that’s the case, there’s a high probability to have several more errors inside the rest of your code still preventing it from working despite fixing these few lines.
1 user thanked author for this post.