ahhh.... nooooooooooooooooooooooooooo recursion.
Ok you have a number of issues to fix in this code.
HAHAHA

I know my skills suck

and have much to learn... I can take the criticism, please enlighten me! Willing and eager to learn!!! Learning on the fly, here... really just started writing script (yes, singular... onlly one semi-legitimate script so far) about a month ago.
(1) Journal -- Journal scanning can be tricky ... journal messages take time to appear. Therefor you have to wait for them. So you need a loop that checks journal for x ms waiting for what you need to see and then moves on. For example of some advanced journal useage see TMs journal subs.. or I have some as well but they are buried in other code without a write up.
Just worked that out to some extent in my travel sub... not perfect, but works for my mule for now, I realize that i really should be using for loops for journal scans, but scanjournal has been causing me to smash my face on my keyboard for about a week, and I'm working up to spending the time and care it really needs...
Here's what I did in my travel sub just now:
recover:
manarecallwait:
if #mana < 10
goto manarecallwait
spcrwait:
set %endcrwait #systime
set %checkcrwait %endcrwait - %startcrwait
if %checkcrwait < %spcr
goto spcrwait
event macro 15 31 ;recall
target 5s
event macro 22 0
set %jupdate #jindex
set %startcrwait #systime
set %closerbx #contposx + 250
set %closerby #contposy + 130
if #contsize = 452_236
click %closerbx %closerby r
jindexupdatewait:
if #jindex = %jupdate <----------------------- journal update wait!
{
if %xcheck <> #charposx || %ycheck <> #charposy
return
goto jindexupdatewait
}
scanjournal 1
if That_location in #journal
return
if More_reagents in #journal || You have_not in #journal
goto recover
return
(2) Recursions --- the sub dig calls itself from a number of places... not good .. means over time more and more memory is used .. run it longer enough and it will burn up all available memory. + its not necessary ie the if #weight > %carryweight calls dig but if you just removed the Gosub dig line it would loop back to the beginning of dig anyways !!! + you have this same code repeated at start of repeat loop and near end.
LOL!!!! literally LOL!!!
I did a triple take on that a few times when I was posting it, lmao... I get tired at the end of the night, and I just fix any errors in my scripts with the first thing I think of.
I can tell you why I did that, and it's because of finditem fails
AND that's one of the many finditem fails that caused me to start this thread... sometimes when my mule drops ore at secure, finditem just fails and and my for #findindex 1 #findcnt just misses one... I tried for #findindex 0 #findcnt for a couple hours a couple weeks ago, but finally realized that it didn't really add one, just probably posted an N/A in the background, and like you've pointed out... probably a memory leak.
Again, i find it hilarious you called me on that... as I was posting it, I literally was thinking *I
really should make that "finditem ore" loop until finditem updates correctly*

(3) gotos out of a sub ... goto nextrune .. nextrune is not in the sub dig therefor...
OK, so I was a bit miffed

by this at first, but...
AHA!

(so I wrote that like a month ago, and it was literally my first excursion into actual looping script writing

)
But I think I've got it figured out, so here's THAT PART f what I have, and then the fix:
sub rune
{
set %runecnt %1
set %veincnt %2
set %onvein %3
set %digx %4
set %digy %5
set %digz %6
set %dkind %7
set %dtile %8
if %onvein = 1
gosub travel nextrune %runecnt
gosub dig
nextrune: <------------ the goto's target
continue
}
return
...
if #weight > %carryweight
{
if #weight > %nrweight && %onvein = %veincnt && %stripmine = no
{
event sysmessage Stripmining? %stripmine
gosub travel home
gosub secops
}
goto nextrune <------------------ the goto in question
}
and the fix:
sub rune
{
set %runecnt %1
set %veincnt %2
set %onvein %3
set %digx %4
set %digy %5
set %digz %6
set %dkind %7
set %dtile %8
if %onvein = 1
gosub travel nextrune %runecnt
gosub dig <------------ sub dig>return goes where I wanted the goto to go, anyway!!!! :D
continue
}
return
...
if There_is_no in #journal
{
if #weight > %nrweight && %onvein = %veincnt && %stripmine = no
{
event sysmessage Stripmining? %stripmine
gosub travel home
gosub secops
}
return <------- sub dig return
}
I literraly had
NO idea how...
sub blahblahblah
return
...worked when I wrote that, and so I used goto... (first few days I just put return because I thought it needed it before realizing that leaving out return is like having an if with only an "{")
THANK YOU FOR POINTING THAT OUT! 
LMAO!!! I actually find this hilarious...
it can never return to this spot and eats memory like (1).
so, I'm assuming my other 2 weightchecks should
ALSO return rather than
gosub... which isn't really waht I want it to do... I'll figure that out... again,
THANK YOU!Sorry cannot help myself... nitpicking .. but do check out tms journal subs will help you.
NOOOOO!!!!! Please
do nitpick!!! I've looked over your library as well as TM's, and at somepoint I'll probably go over everyone's... Spent a couple hours earlier looking over 12x's mining script, and reading the forum thread until it was just bug fixes... (that mining script was the only thing I've
really been able to understand, so far, as that's the only thing I've really written... still learning... hard to translate, when you don't even understand the language you're reading)
[jk ;sorta]
But seriously...
MEMORY LEAKS???
first off... I'm fairly detatched from this with 16gb of RAM.. I realize that memory leaks are like the plague and NO amount of RAM will ultimately protect from leaks... especially with software like EUO, where enhanced memory detection/correction was doubtfully implememnted...
And SECONDLY... we're talking about a 35/19 year old game... MEMORY LEAKS??? Yes, I remember having 64mb of RAM and an 80gb HDD... but the memory leaks you're talking about would take something like a week for Windows Task Manager to even register... ---> .01gb!!!!
[/jk]
Seriously, tho... I really do appreciate the time you've given me on this subject... I really am hoping to learn techniques that apply to RL programming, and I'm glad you've pointed out the things you have.

I was just rereading Cheffe's tut on LPC:
http://wiki.easyuo.com/index.php?title=Tutorials:Cheffe1and he pretty much says what I was thinking about doing... I probably thought of that, because he said it...
-----------------------
Hey EN!
Just wanted to say Thanks again... i just realized what you were saying about waiting for the journal to update... going to work that in the dig sub... that might actually the fix the sub 50ms variance (AND get rid of the finditem that was pissing me off) I've been wanting to fix!!!!

AND...
wanted to ask about goto's... since I use them a lot... as long as they goto a a blahblah: in the same sub, they're fine? because that would fix the other 2 gosubs in my dig sub...